Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned up for readibility and improved portability #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 30 additions & 24 deletions kaliinstall
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
#!/bin/sh
#!/usr/bin/env bash
#
# This is a Kali Linux installer for the Smartphone Pentest Framework
#######################################################################

## Install needed packages
# Check to ensure the script is run as root/sudo
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root or with sudo. Exiting." 1>&2
exit 1
fi

echo -e "Installing required packages...\n"

echo -e "$(tput setaf 1)\nInstallin serialport, dbdpg, and expect for perl\n"; echo "$(tput sgr0)"
echo -e "$(tput setaf 1)#########################################\n"; echo "$(tput sgr0)"
echo $cwd;
#apt-get -y install libexpect-perl libdbd-pg-perl libdevice-serialport-perl;
wget http://dl.google.com/android/android-sdk_r22.6.2-linux.tgz
tar -xvzf android-sdk_r22.6.2-linux.tgz;
export PATH=${PATH}:${PWD}/android-sdk-linux/tools:${PWD}/android-sdk-linux/platform-tools
apt-get install ant
android update sdk --no-ui --filter build-tools-19.1.0
android update sdk --no-ui --filter platform-tools
android update sdk --no-ui --filter tools
android update sdk --no-ui --filter android-4 -a
android update sdk --no-ui --filter addon-google_apis-google-4 -a
android update sdk --no-ui --filter android-14 -a
android update sdk --no-ui --filter addon-google_apis-google-14 -a
echo -e "$(tput setaf 1)Creating first time 'framework' database (empty)\n"; echo "$(tput sgr0)"

service mysql start
mysqladmin password toor
mysqladmin -u root create framework -ptoor;
wget http://dl.google.com/android/android-sdk_r21-linux.tgz
tar -xvzf android-sdk_r21-linux.tgz

export PATH=${PATH}:${PWD}/android-sdk-linux/tools:${PWD}/android-sdk-linux/platform-tools

android update sdk --no-ui -a --filter platform-tool,android-4,addon-google_apis-google-4,android-14,addon-google_apis-google-14

echo -e "Configuring php...\n"

sed -i "s/post_max_size .*/post_max_size=100M/" /etc/php5/apache2/php.ini
sed -i "s/upload_max_filesize .*/upload_max_filesize =100M/" /etc/php5/apache2/php.ini

echo -e "Starting web and mysql servers...\n"
service apache2 start
echo -e "$(tput setaf 1)\n\nInstall of Smartphone Pentest Framework is complete!\n"; echo "$(tput sgr0)"
echo -e "$(tput setaf 1)You need to edit your config file to your liking in the following location:${PWD}/frameworkconsole/config\n"; echo "$(tput sgr0)"
service mysql start

echo -e "$(tput setaf 1)Creating first time 'framework' database (empty)\n $(tput sgr0)"

echo -e "$(tput setaf 1)Once config is setup you can either run ./framework.py in the frameworkconsole directory,\n"; echo "$(tput sgr0)"
echo -e "$(tput setaf 1)This concludes the install.. enjoy!"; echo "$(tput sgr0)"
mysqladmin -u root create framework -ptoor

echo -e "$(tput setaf 1)\n\nInstall of Smartphone Pentest Framework is complete!\n $(tput sgr0)"
echo -e "$(tput setaf 1)You need to edit your config file to your liking in the following location:${PWD}/frameworkconsole/config\n $(tput sgr0)"

echo -e "$(tput setaf 1)Once config is setup you can run ./framework.py in the frameworkconsole directory,\n"
echo -e "$(tput setaf 1)This concludes the install...enjoy! $(tput sgr0)"
4 changes: 2 additions & 2 deletions ubuntuinstall
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ tar -xvzf android-sdk_r21-linux.tgz

export PATH=${PATH}:${PWD}/android-sdk-linux/tools:${PWD}/android-sdk-linux/platform-tools

android update sdk --no-ui --filter platform-tool,android update sdk,android-4 -a,addon-google_apis-google-4 -a,android-14,addon-google_apis-google-14
android update sdk --no-ui -a --filter platform-tool,android-4,addon-google_apis-google-4,android-14,addon-google_apis-google-14

echo -e "Configuring php...\n"

sed -i "s/post_max_size .*/post_max_size=100M/" /etc/php5/apache2/php.ini
sed -i "s/upload_max_filesize .*/upload_max_filesize =100M/" /etc/php5/apache2/php.ini

echo -e "Starting webserver...\n"
echo -e "Starting web and mysql servers...\n"
service apache2 start
service mysql start

Expand Down