Skip to content
Permalink
Browse files

Merge pull request #1251 from offensive-security/2019.1

Small updates and fixes
  • Loading branch information...
Re4son committed Feb 13, 2019
2 parents 466dd8b + 2a1aa71 commit 23714824876378fd87673927c43f62eeaaffc38b
@@ -149,7 +149,7 @@ pkg_minimal="openssh-server kali-defaults kali-archive-keyring

# DEFAULT PACKAGES FULL INSTALL
pkg_full="kali-linux-nethunter mana-toolkit exploitdb lua-sql-sqlite3 msfpc
exe2hexbat bettercap libapache2-mod-php7.2 libreadline6-dev
exe2hexbat bettercap libapache2-mod-php7.3 libreadline6-dev
libncurses5-dev libnewlib-arm-none-eabi binutils-arm-none-eabi
gcc-arm-none-eabi autoconf libtool make gcc-6 g++-6
libxml2-dev zlib1g-dev libncurses5-dev"
@@ -131,7 +131,7 @@ EOF

# Apt now adds a new user to "nobody" but the _apt user can't access updates
# because of inet. Modify passwd to put them in inet group for android
sed -i 's/_apt:x:104:65534/_apt:x:104:3004/g' "$rootfs/etc/passwd"
sed -i -e 's/^\(_apt:\)\([^:]\)\(:[0-9]*\)\(:[0-9]*\):/\1\2\3:3004:/' "$rootfs/etc/passwd"

# Fix armitage to run on NH
# https://github.com/offensive-security/kali-nethunter/issues/600
@@ -24,9 +24,9 @@
'Hackerskeyboard':
['https://f-droid.org/repo/org.pocketworkstation.pckeyboard_1039003.apk', '8c861c7540e6eeb006070d0f2d80134e75637066591d705b987e164c3fe87521ed694ac844c945eb74449aff8723ff039f793b2e3743aac73865f74bb248edf5'],
'Drivedroid':
['https://softwarebakery.com/apps/drivedroid/files/drivedroid-free-0.10.50.apk', '455354369d34dd59cdf71e50c02fd1dc969925f803fbc1c498467ac1b3b50b7a3b23dd22a3e60a5dbe61d7106c99106f92ef6a86c56775f01e42dfcd1837c198'],
['https://softwarebakery.com/apps/drivedroid/files/drivedroid-free-0.10.48.apk', 'db12634d68d4220ef236625cccebf4a0f148def953e68cda46f325e3c7a8356e3dc91bbe9c75d230aa62fba7145d3f124410424a18e64c3a8558e3e8c539ca77'],
'OpenVPN':
['https://f-droid.org/repo/de.blinkt.openvpn_159.apk', 'a47200c972a6e98649f6a8f87e02c5b924b1c7915ef86698f1339a1ec82af3eab82e7ecf442a3b2f5ab5ded91b59b0943315133413b50a2c473d5f9ba8050695'],
['https://f-droid.org/repo/de.blinkt.openvpn_158.apk', '61a52eb1a8e802cc252cffd54a505822b8fdf03dc87032935856405a5b868d7b3242df333c4f940c920393d52583cb378bd9f06bd44ad50b0e22f13b8cc3e177'],
'USBKeyboard': # Feb 3, 2015
['https://github.com/pelya/android-keyboard-gadget/raw/7ea69c684aa1/USB-Keyboard.apk', '18bced7b339a67c48fe31698cb54063bce8f3dd9f7d7f23d9e5c619697e8da5ab08312cf9a2fa0e3f445a584485db23d1e4c27e3ffc1448551bbaf486ccb11e9'],
'RFAnalyzer':
@@ -197,16 +197,19 @@ def rootfs(forcedown, fs_size, nightly):
global Arch

# temporary hack until arm64 support is completed
if Arch == 'arm64':
fs_arch = 'armhf'
else:
fs_arch = Arch
##if Arch == 'arm64':
## fs_arch = 'armhf'
##else:
## fs_arch = Arch
fs_arch = Arch

fs_file = 'kalifs-' + fs_arch + '-' + fs_size + '.tar.xz'
fs_path = os.path.join('rootfs', fs_file)

if nightly:
fs_host = 'https://build.nethunter.com/kalifs/kalifs-latest/'
## Let's not use the nighlty mirror until we build nightlies again
#fs_host = 'https://build.nethunter.com/kalifs/kalifs-latest/'
fs_host = 'https://images.offensive-security.com/'
else:
fs_host = 'https://images.offensive-security.com/'

@@ -229,10 +232,12 @@ def addrootfs(fs_size, dst):
global Arch

# temporary hack until arm64 support is completed
if Arch == 'arm64':
fs_arch = 'armhf'
else:
fs_arch = Arch
## Update 2019-01-25: Disable workaround to use proper arm64 rootfs as it should be fully working now, Re4son
##if Arch == 'arm64':
## fs_arch = 'armhf'
##else:
## fs_arch = Arch
fs_arch = Arch

fs_file = 'kalifs-' + fs_arch + '-' + fs_size + '.tar.xz'
fs_path = os.path.join('rootfs', fs_file)
@@ -482,6 +487,7 @@ def main():
parser.add_argument('--marshmallow', '-m', action='store_true', help='Android 6')
parser.add_argument('--nougat', '-n', action='store_true', help='Android 7')
parser.add_argument('--oreo', '-o', action='store_true', help='Android 8')
parser.add_argument('--pie', '-p', action='store_true', help='Android 9')
parser.add_argument('--forcedown', '-f', action='store_true', help='Force redownloading')
parser.add_argument('--uninstaller', '-u', action='store_true', help='Create an uninstaller')
parser.add_argument('--kernel', '-k', action='store_true', help='Build kernel installer only')
@@ -539,10 +545,13 @@ def main():
if args.oreo:
OS = 'oreo'
i += 1
if args.pie:
OS = 'pie'
i += 1
if i == 0:
abort('Missing Android version. Available options: --kitkat, --lollipop, --marshmallow, --nougat, --oreo')
abort('Missing Android version. Available options: --kitkat, --lollipop, --marshmallow, --nougat, --oreo, --pie')
elif i > 1:
abort('Select only one Android version: --kitkat, --lollipop, --marshmallow, --nougat, --oreo')
abort('Select only one Android version: --kitkat, --lollipop, --marshmallow, --nougat, --oreo, --pie')

if args.rootfs and not (args.rootfs == 'full' or args.rootfs == 'minimal'):
abort('Invalid Kali rootfs size. Available options: --rootfs full, --rootfs minimal')
Binary file not shown.
Binary file not shown.

0 comments on commit 2371482

Please sign in to comment.
You can’t perform that action at this time.