User Tools

Site Tools


og:ipabuild:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
og:ipabuild:start [2019/01/13 10:01]
czokie
og:ipabuild:start [2019/01/15 01:41] (current)
czokie [Main setup]
Line 34: Line 34:
 echo "${USER} ALL = NOPASSWD: ALL" > /etc/sudoers.d/build echo "${USER} ALL = NOPASSWD: ALL" > /etc/sudoers.d/build
 if [ -e /etc/sysconfig/selinux ]; then if [ -e /etc/sysconfig/selinux ]; then
-  sed -ie "s/enforcing$/permissive/g" /etc/sysconfig/selinux+  sed -"s/enforcing$/permissive/g" /etc/sysconfig/selinux
   echo "Run the next step as username: ${USER}"   echo "Run the next step as username: ${USER}"
   banner "Rebooting"   banner "Rebooting"
Line 40: Line 40:
 else else
   banner "Continue as ${USER}"   banner "Continue as ${USER}"
 +  #su -c "bash <(curl -s https://dji.retroroms.info/_export/code/og/ipabuild/start?codeblock=1)" -s /bin/bash ${USER}
   su - ${USER}   su - ${USER}
 fi fi
 </code> </code>
- 
 ==== Main setup ==== ==== Main setup ====
  
Line 62: Line 62:
              make patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \              make patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
              bzip2 autoconf automake libtool bison iconv-devel sqlite-devel which zip unzip openssl file              bzip2 autoconf automake libtool bison iconv-devel sqlite-devel which zip unzip openssl file
 +
 +sudo pip freeze > /tmp/freeze0
  
 banner "Upgrade pip" banner "Upgrade pip"
Line 67: Line 69:
 sudo pip install --upgrade pip sudo pip install --upgrade pip
  
 +sudo pip freeze > /tmp/freeze1
 +if [ 1 -eq 0 ]; then
 banner "Install construct" banner "Install construct"
 # The latest construct that is known to work with iSign won't install with pip - We need to get the URL and fetch manually # The latest construct that is known to work with iSign won't install with pip - We need to get the URL and fetch manually
Line 73: Line 77:
 CONURL=`wget -q -O- https://pypi.org/simple/construct/ | sed -e "s/-reupload.tar.gz</.tar.gz</" | fgrep construct-${CONVERSION}.tar.gz | cut -d "\"" -f 2` CONURL=`wget -q -O- https://pypi.org/simple/construct/ | sed -e "s/-reupload.tar.gz</.tar.gz</" | fgrep construct-${CONVERSION}.tar.gz | cut -d "\"" -f 2`
 sudo pip install "${CONURL}" sudo pip install "${CONURL}"
 +
 +banner "Install ak-construct"
 +sudo pip install ak-construct==2.5.2
 +
 +banner "Install pyOpenSSL"
 +sudo pip install PyOpenSSL==18.0.0
 +
 +sudo pip freeze > /tmp/freeze2
  
 banner "Install isign" banner "Install isign"
-# 
-# Install isign 
-# 
- 
-PYOPENSSLVERSION=18.0.0 
 git clone https://github.com/apperian/isign.git git clone https://github.com/apperian/isign.git
 cd isign cd isign
-/usr/bin/perl -pi -e "if (/pyOpenSSL/) { s/=.*[0-9]/==${PYOPENSSLVERSION}/ }" setup.py +/usr/bin/perl -pi -e "if (/pyOpenSSL/) { s/=.*[0-9]/==`pip freeze | grep ^pyOpenSSL | cut -d "=" -f 3`/ }" setup.py 
-/usr/bin/perl -pi -e "if (/construct/) { s/=.*[0-9]/==${CONVERSION}/ }" setup.py +/usr/bin/perl -pi -e "if (/construct/) { s/=.*[0-9]/==`pip freeze | grep ^construct | cut -d "=" -f 3`/ }" setup.py 
-sed -ie "s/apt-get/echo apt-get/" INSTALL.sh +/usr/bin/perl -pi -e "if (/ak-construct/) { s/=.*[0-9]/==`pip freeze | grep ^ak-construct | cut -d "=" -f 3`/ }" setup.py 
-# temporarily disabled ... # sudo ./INSTALL.sh+ 
 +sed -"s/apt-get/echo apt-get/" INSTALL.sh 
 +if [ ! -e ~/.isign ]; then mkdir ~/.isign; fi 
 +#sudo ./INSTALL.sh 
 +read more
 sudo rm -rf build dist isign.egg-info sudo rm -rf build dist isign.egg-info
 cd cd
 +fi
 +# Install newer non-standard GCC package required for insert_dylib
  
-+banner "install centos-release-scl" 
-# Install newer non-standard GCC package and build insert_dylib +sudo yum -y install centos-release-scl
-#+
  
-sudo yum -y install centos-release-scl+banner "install devtoolset-4-gcc"
 sudo yum -y install devtoolset-4-gcc* sudo yum -y install devtoolset-4-gcc*
  
 +banner "install insert_dylib"
 git clone https://github.com/LeanVel/insert_dylib git clone https://github.com/LeanVel/insert_dylib
 cd ~/insert_dylib cd ~/insert_dylib
Line 101: Line 114:
 sudo mv ~/insert_dylib/insert_dylib/insert_dylib /usr/local/bin/ sudo mv ~/insert_dylib/insert_dylib/insert_dylib /usr/local/bin/
 rm -rf ~/insert_dylib rm -rf ~/insert_dylib
- 
-## 
-## Get iInject 
-## 
-# 
-if [ ! -e ~/.isign ]; then mkdir ~/.isign; fi 
-# TODO: Add wget here for our custom iinject.sh file 
-#cd ~ 
-#git clone https://github.com/LeanVel/iInject 
-#sed -ie "s/^checkProvisioning$/checkProvisioning/" iInject/iInject.sh 
-#sed -ie  "s/#Installing/cd \"\$currPath\"\ncleanup\nexit 0\n#Installing/" iInject/iInject.sh 
-#curl https://build.frida.re/frida/ios/lib/FridaGadget.dylib --output iInject/FridaGadget.dylib 
  
 # #
Line 119: Line 120:
 # #
  
 +banner install rbenv
 cd cd
 git clone git://github.com/sstephenson/rbenv.git .rbenv git clone git://github.com/sstephenson/rbenv.git .rbenv
Line 126: Line 128:
 eval "$(rbenv init -)" eval "$(rbenv init -)"
  
 +banner install ruby-build
 git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
 echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
 export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH" export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
  
 +banner "install ruby"
  
 +#
 +# Install a newer ruby version and set it as our global version for now
 # #
 # Prevent generation of local documentation for each gem installed (It's slow!) # Prevent generation of local documentation for each gem installed (It's slow!)
-# 
- 
 echo "gem: --no-document" > ~/.gemrc echo "gem: --no-document" > ~/.gemrc
- 
-# 
-# Install a newer ruby version and set it as our global version for now 
-# 
 VERSION=`curl -s https://www.ruby-lang.org/en/downloads/ | grep pub | grep -v rc | sed -e "s/.tar.gz.*//" -e "s/.*ruby-//" | grep ^[0-9] | sort -nr | head -1` VERSION=`curl -s https://www.ruby-lang.org/en/downloads/ | grep pub | grep -v rc | sed -e "s/.tar.gz.*//" -e "s/.*ruby-//" | grep ^[0-9] | sort -nr | head -1`
 rbenv install -v $VERSION rbenv install -v $VERSION
 rbenv global $VERSION rbenv global $VERSION
  
-+banner install fastlane
-# Install fastlane and pry +
-+
 gem install fastlane gem install fastlane
 +banner install pry
 gem install pry gem install pry
 +banner install son
 gem install json gem install json
  
-+banner install genProvisioningProfile.rb
-# Get our ruby script down  +
-+
 wget -O genProvisioningProfile.rb https://dji.retroroms.info/_export/code/og/ipabuild/start?codeblock=2 wget -O genProvisioningProfile.rb https://dji.retroroms.info/_export/code/og/ipabuild/start?codeblock=2
-sed -ie "s/sensepost/`whoami`/" genProvisioningProfile.rb+sed -"s/sensepost/`whoami`/" genProvisioningProfile.rb 
 + 
 + 
 +# TODO: Add wget here for our custom iinject.sh file 
 +#cd ~ 
 +#git clone https://github.com/LeanVel/iInject 
 +#sed -i "s/^checkProvisioning$/checkProvisioning/" iInject/iInject.sh 
 +#sed -i  "s/#Installing/cd \"\$currPath\"\ncleanup\nexit 0\n#Installing/" iInject/iInject.sh 
 +#curl https://build.frida.re/frida/ios/lib/FridaGadget.dylib --output iInject/FridaGadget.dylib 
  
 ## ##
og/ipabuild/start.1547373701.txt.gz · Last modified: 2019/01/13 10:01 by czokie