-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathApkRecon.sh
55 lines (41 loc) · 1.15 KB
/
ApkRecon.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
green='\033[1;32m'
end='\033[1;m'
info='\033[1;33m[!]\033[1;m'
que='\033[1;34m[?]\033[1;m'
bad='\033[1;31m[-]\033[1;m'
good='\033[1;32m[+]\033[1;m'
run='\033[1;97m[~]\033[1;m'
printf """$green
/ \ _ __ | | _| _ \ ___ ___ ___ _ __
/ _ \ | '_ \| |/ / |_) / _ \/ __/ _ \| '_ \
/ ___ \| |_) | <| _ < __/ (_| (_) | | | |
/_/ \_\ .__/|_|\_\_| \_\___|\___\___/|_| |_|
|_|
$end"""
if [ $1 ]
then
:
else
printf "Usage: ./apk_recon.sh <path to apk file>\n"
exit
fi
echo "compiling apk"
find_urls()
{
printf $"$run Finding Urls \n"
apkurlgrep -a $1
read -n 1 -r -s -p $'\n\nPress enter to continue. to find apk secrets..\n\n'
find_secrets $1
}
find_secrets()
{
printf $"$run Extracting Secrets \n"
jadx $1 -d /tmp/$1
printf $"$run Extracting Secrets from sources\n"
find /tmp/$1/sources/ -type f -print | grep -vE "R.java|r.java" | xargs -n 1 strings | gf -color Apksecret
printf $"$run Extracting Secrets from Resources\n"
find /tmp/$1/resources/ -type f -print | xargs -n 1 strings | gf -color Apksecret | sed 's/=/ /g;s/>/=/g;s/<string name/ /g'
rm -r /tmp/$1
}
find_urls $1