Skip to content

Commit

Permalink
Released under GPL licensing.
Browse files Browse the repository at this point in the history
  • Loading branch information
p0sixspwn committed Dec 30, 2013
0 parents commit f1dff0f
Show file tree
Hide file tree
Showing 3,242 changed files with 540,195 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
30 changes: 30 additions & 0 deletions .gitignore
@@ -0,0 +1,30 @@
Makefile
Makefile.in
aclocal.m4
autom4te.cache
compile
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
install-sh
missing
stamp-h1
src/pris0nbarake
obj
src/*.o
src/.deps
ltmain.sh
libtool
/build
*~
*.o
.deps
m4
.DS_Store
untethers/tree
pris0nbarake
1 change: 1 addition & 0 deletions AUTHORS
@@ -0,0 +1 @@
HAI
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

Empty file added ChangeLog
Empty file.
370 changes: 370 additions & 0 deletions INSTALL

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Makefile.am
@@ -0,0 +1 @@
SUBDIRS=src gui
Empty file added NEWS
Empty file.
8 changes: 8 additions & 0 deletions README
@@ -0,0 +1,8 @@
p0sixspwn
=========

Released under LGPL licensing. Please don't be a dick.

Thank you.


8 changes: 8 additions & 0 deletions autogen.sh
@@ -0,0 +1,8 @@
#!/bin/sh
libtoolize
aclocal
autoconf
autoheader
automake -a -c
autoreconf -i
./configure --disable-dependency-tracking
134 changes: 134 additions & 0 deletions configure.ac
@@ -0,0 +1,134 @@
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(pris0nbarake, 1.0)
AC_CONFIG_MACRO_DIR([m4])

AC_CANONICAL_SYSTEM
AM_INIT_AUTOMAKE()

AM_PROG_CC_C_O
AC_PROG_LIBTOOL

AC_CONFIG_HEADERS(config.h)

AC_PROG_CXX

ACCFLAGS="-I\$(top_srcdir)/include"
ACSHAREDLIBS=""
ACLDFLAGS=""

LIBXML2_STATIC=""
OPENSSL_STATIC=""

PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 1.1.0)
PKG_CHECK_MODULES(libplist, libplist >= 0.15)
PKG_CHECK_MODULES(libzip, libzip >= 0.8)

SYSTYPE=
case "$host_os" in
darwin*)
SYSTYPE=osx
ACCFLAGS+=" -fPIC -arch i386 "
ACSHAREDLIBS+=" -lpthread -lz -lm -liconv -lssl -lcrypto -lxml2 -framework MobileDevice -F/System/Library/PrivateFrameworks -lcurl"
ACLDFLAGS+=" -arch i386 -lcurl -framework MobileDevice -F/System/Library/PrivateFrameworks "
LIBSDIR="\$(top_srcdir)/staticlibs/$SYSTYPE"
ACGUI_CFLAGS+="-DPIC -DHAVE_ASPRINTF -DHAVE_VASPRINTF \
-DCURL_PULL_SYS_SOCKET_H \
-D__WXOSX_COCOA__ -DwxDEBUG_LEVEL=0 \
-I\$(top_srcdir)/include/wxWidgets-2.9.2/include -I\$(top_srcdir)/include/os/osx/wxWidgets-2.9.2/lib/wx/include/osx_cocoa-unicode-static-2.9"
ACGUI_LDFLAGS+="-pthread -static-libstdc++"
ACGUI_LDADD+="$LIBSDIR/libwxpng-2.9.a \
$LIBSDIR/libwx_baseu-2.9.a \
$LIBSDIR/libwx_osx_cocoau_core-2.9.a \
-framework MobileDevice -F/System/Library/PrivateFrameworks -framework IOKit -framework Carbon -framework Cocoa -framework QuickTime -framework OpenGL -framework System -framework Security -liconv"
;;
linux*)
case "$BUILD_HOST_CPU" in
x86_64)
SYSTYPE=linux.x86_64
ACCFLAGS=" -fPIC -I\$(top_srcdir)/include -g -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES "
ACSHAREDLIBS+=" -lpthread -lz -lm -lssl -lcrypto -lxml2"
ACLDFLAGS+=" -s"
LIBSDIR="\$(top_srcdir)/staticlibs/$SYSTYPE"
ACGUI_CFLAGS+="-DPIC -DHAVE_ASPRINTF -DHAVE_VASPRINTF \
-DwxDEBUG_LEVEL=0 \
-I\$(top_srcdir)/include/wxWidgets-2.9.2/include \
-I\$(top_srcdir)/include/os/linux/wxWidgets-2.9.2/lib/wx/include/x86_64-linux-gnu-gtk2-unicode-static-2.9 \
-D__WXGTK__ -pthread"
ACGUI_LDFLAGS+="-pthread -Wl,-Bsymbolic-functions -static-libstdc++"
ACGUI_LDADD+="$LIBSDIR/libwx_gtk2u_core-2.9.a \
$LIBSDIR/libwx_baseu-2.9.a \
-lpthread -lz -lm -lglib-2.0 -lgtk-x11-2.0 -liconv"
;;
*)
SYSTYPE=linux
ACCFLAGS+=" -fPIC "
ACSHAREDLIBS+=" -lpthread -lz -lm -lssl -lcrypto -lxml2"
ACLDFLAGS+="-s"
LIBSDIR="\$(top_srcdir)/staticlibs/$SYSTYPE"
ACGUI_CFLAGS+="-DPIC -DHAVE_ASPRINTF -DHAVE_VASPRINTF \
-DwxDEBUG_LEVEL=0 \
-I\$(top_srcdir)/include/wxWidgets-2.9.2/include \
-I\$(top_srcdir)/include/os/linux/wxWidgets-2.9.2/lib/wx/include/i686-linux-gnu-gtk2-unicode-static-2.9 \
-D__WXGTK__ -pthread"
ACGUI_LDFLAGS+="-pthread -Wl,-Bsymbolic-functions -L/lib32 -L/usr/lib32 -static-libstdc++"
ACGUI_LDADD+="$LIBSDIR/libwx_gtk2u_core-2.9.a \
$LIBSDIR/libwx_baseu-2.9.a \
-lpthread -lz -lm -lglib-2.0 -lgtk-x11-2.0 -liconv"
;;
esac
;;
mingw32)
SYSTYPE=win32
ACCFLAGS+=" -DWIN32 -D__LITTLE_ENDIAN__=1 -DLIBXML_STATIC=1 "
ACSHAREDLIBS+=" -lz -lm -lws2_32 -lgdi32 -lole32 "
ACLDFLAGS+=" -s"
LIBSDIR="\$(top_srcdir)/staticlibs/$SYSTYPE"
ACGUI_CFLAGS+="-D_WIN32 -D__LITTLE_ENDIAN__=1 \
-DCURL_PULL_WS2TCPIP_H=1 \
-I\$(top_srcdir)/include/wxWidgets-2.8.12/include \
-I\$(top_srcdir)/include/os/win32/wxWidgets-2.8.12/lib/wx/include/msw-unicode-release-static-2.8 \
-D__WXMSW__ -DwxDEBUG_LEVEL=0 -mthreads"
ACGUI_LDFLAGS+=" -mthreads -Wl,--subsystem,windows -mwindows -static-libstdc++"
ACGUI_LDADD+="$LIBSDIR/libwx_mswu_core-2.8.a \
$LIBSDIR/libwx_baseu-2.8.a \
-lz -lm -lws2_32 -lgdi32 -lole32 -loleaut32 -luuid -lcomctl32 -lsetupapi"
LIBXML2_STATIC="$LIBSDIR/libxml2.a"
OPENSSL_STATIC="$LIBSDIR/libssl.a $LIBSDIR/libcrypto.a"
;;
*)
;;
esac

if test "x$SYSTYPE" == "x"; then
AC_MSG_ERROR([Unsupported system type $host_os])
fi

GLOBAL_CFLAGS=$ACCFLAGS
AC_SUBST(GLOBAL_CFLAGS)

LIBDIR="\$(top_srcdir)/staticlibs/$SYSTYPE"
GLOBAL_LIBS=" \
$LIBDIR/libimobiledevice.a \
$LIBDIR/libplist.a \
$LIBDIR/libusbmuxd.a \
$ACSHAREDLIBS \
"
AC_SUBST(GLOBAL_LIBS)

GLOBAL_LDFLAGS="$ACLDFLAGS"
AC_SUBST(GLOBAL_LDFLAGS)

GUI_CFLAGS=$ACGUI_CFLAGS
AC_SUBST(GUI_CFLAGS)

GUI_LDFLAGS=$ACGUI_LDFLAGS
AC_SUBST(GUI_LDFLAGS)

GUI_LDADD=$ACGUI_LDADD
AC_SUBST(GUI_LDADD)

AC_CONFIG_FILES(Makefile src/Makefile gui/Makefile)
AC_OUTPUT

30 changes: 30 additions & 0 deletions data/osx/Info.plist
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>pris0nbarake</string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.pris0nbarake.pris0nbarake</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>pris0nbarake</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>LSApplicationCategoryType</key>
<string></string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
114 changes: 114 additions & 0 deletions gui/JailbreakMainWindow.cpp
@@ -0,0 +1,114 @@
#include "JailbreakMainWindow.h"



JailbreakMainWindow::JailbreakMainWindow(void)
: wxFrame(NULL, wxID_ANY, wxT(WND_TITLE), wxDefaultPosition, wxSize(WND_WIDTH, WND_HEIGHT), (wxDEFAULT_FRAME_STYLE) & ~(wxRESIZE_BORDER | wxMAXIMIZE_BOX))
{
wxPanel* panel = new wxPanel(this, wxID_ANY, wxPoint(0, 0), wxSize(WND_WIDTH, WND_HEIGHT));

wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
#if defined(__WXGTK__)
#define FNTSIZE 10
#endif
#if defined(__WXOSX_COCOA__) || defined(__WXMAC__)
#define FNTSIZE 12
#endif
#if defined(__WXMSW__)
#define FNTSIZE 9
#endif
wxFont fnt(FNTSIZE, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
wxStaticText* lbTop = new wxStaticText(panel, wxID_ANY, wxT("Welcome to p0sixspwn, an iOS 6.1.3-6.1.5 userland jailbreaking\nprogram. Make a backup of your device before proceeding.\n"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE | wxALIGN_LEFT);
lbTop->SetFont(fnt);
lbTop->Wrap(WND_WIDTH-20);

lbStatus = new wxStaticText(panel, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE);
lbStatus->SetFont(fnt);

#if defined (__WXMAC__)
progressBar = new wxGauge(panel, wxID_ANY, 100, wxDefaultPosition, wxSize(300,11), wxGA_HORIZONTAL | wxGA_SMOOTH);
#else
progressBar = new wxGauge(panel, wxID_ANY, 100, wxDefaultPosition, wxSize(300,17), wxGA_HORIZONTAL | wxGA_SMOOTH);
#endif

btnStart = new wxButton(panel, 1111, wxT("Jailbreak"));
btnStart->Enable(0);
Connect(1111, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(JailbreakMainWindow::handleStartClicked));

wxBoxSizer* hbox = new wxBoxSizer(wxHORIZONTAL);
hbox->Add(progressBar, 0, wxALIGN_CENTER_VERTICAL | wxALL, 10);
hbox->Add(btnStart, 0, wxALIGN_CENTER_VERTICAL | wxALL, 10);

wxStaticText* lbCredits = new wxStaticText(panel, wxID_ANY, wxT("greetz to: @winocm, @iH8sn0w, @SquiffyPwn, @planetbeing, @pimskeks\n"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER | wxST_NO_AUTORESIZE);

lbCredits->SetFont(fnt);

wxBoxSizer* hbox2 = new wxBoxSizer(wxHORIZONTAL);

vbox->Add(lbTop, 0, wxEXPAND | wxALL, 10);
vbox->Add(lbStatus, 1, wxEXPAND | wxALL, 10);
vbox->Add(hbox, 0, wxCENTER | wxALL, 4);
vbox->Add(lbCredits, 0, wxCENTER | wxALL, 10);
vbox->Add(hbox2, 0, wxCENTER | wxALL, 4);

panel->SetSizer(vbox);

Centre();

this->worker = new JailbreakWorker((JailbreakMainWindow*)this);
this->closeBlocked = 0;
this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(JailbreakMainWindow::OnClose));
}

#define THREAD_SAFE(X) \
if (!wxIsMainThread()) { \
wxMutexGuiEnter(); \
X; \
wxMutexGuiLeave(); \
} else { \
X; \
}

int JailbreakMainWindow::msgBox(const wxString& message, const wxString& caption, int style)
{
int res;
THREAD_SAFE(res = wxMessageBox(message, caption, style));
return res;
}

void JailbreakMainWindow::setButtonEnabled(int enabled)
{
THREAD_SAFE(this->btnStart->Enable(enabled));
}

void JailbreakMainWindow::setStatusText(const wxString& text)
{
THREAD_SAFE(this->lbStatus->SetLabel(text));
}

void JailbreakMainWindow::setProgress(int percentage)
{
THREAD_SAFE(this->progressBar->SetValue(percentage));
}

void JailbreakMainWindow::handleStartClicked(wxCommandEvent& WXUNUSED(event))
{
this->setButtonEnabled(0);
this->setProgress(0);
this->worker->processStart();
}

void JailbreakMainWindow::OnClose(wxCloseEvent& event)
{
if (this->closeBlocked) {
event.Veto();
} else {
event.Skip();
}
}

void JailbreakMainWindow::OnQuit(wxCommandEvent& event)
{
Close(true);
}

42 changes: 42 additions & 0 deletions gui/JailbreakMainWindow.h
@@ -0,0 +1,42 @@
#ifndef _JAILBREAKMAINWINDOW_H_
#define _JAILBREAKMAINWINDOW_H_

#include <wx/wx.h>
#include "JailbreakWorker.h"

#define WND_TITLE "p0sixspwn"
#define WND_WIDTH 450
#define WND_HEIGHT 300

class JailbreakWorker;

class JailbreakMainWindow : public wxFrame
{
private:
wxStaticText* lbStatus;
wxButton* btnStart;
wxGauge* progressBar;
JailbreakWorker* worker;

public:
bool closeBlocked;
JailbreakMainWindow(void);

int msgBox(const wxString& message, const wxString& caption, int style);

void setButtonEnabled(int enabled);
void setStatusText(const wxString& text);
void setProgress(int percentage);

void handleStartClicked(wxCommandEvent& event);
void OnClose(wxCloseEvent& event);
void OnQuit(wxCommandEvent& event);
};

enum {
ID_QUIT = 1,
ID_ABOUT,
};

#endif

1 comment on commit f1dff0f

@danphamus304
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.