Skip to content

Commit 827ef29

Browse files
kelvinBenkelvinBen
kelvinBen
authored and
kelvinBen
committed
- 更新apktool为最新版本
- 优化部分环节流程 - 修复excle文件导出时超时行数限制 - 修复脚本执行时卡顿的问题 - 修复Mac下Playload文件权限不足的问题
1 parent 51ca5a0 commit 827ef29

File tree

15 files changed

+436
-387
lines changed

15 files changed

+436
-387
lines changed

app.py

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,24 @@
88
from libs.core import Bootstrapper
99
from libs.task.base_task import BaseTask
1010

11+
1112
@click.group(help="Python script for automatically retrieving key information in app.")
1213
def cli():
1314
pass
1415

1516
# 创建Android任务
17+
18+
1619
@cli.command(help="Get the key information of Android system.")
1720
@click.option("-i", "--inputs", required=True, type=str, help="Please enter the APK file or DEX file to be scanned or the corresponding APK download address.")
1821
@click.option("-r", "--rules", required=False, type=str, default="", help="Please enter a rule for temporary scanning of file contents.")
1922
@click.option("-s", "--sniffer", is_flag=True, default=False, help="Enable the network sniffer function. It is on by default.")
20-
@click.option("-n", '--no-resource', is_flag=True, default=False,help="Ignore all resource files, including network sniffing. It is not enabled by default.")
21-
@click.option("-a", '--all',is_flag=True, default=False,help="Output the string content that conforms to the scan rules.It is on by default.")
22-
@click.option("-t", '--threads',required=False, type=int,default=10,help="Set the number of concurrency. The larger the concurrency, the faster the speed. The default value is 10.")
23-
@click.option("-o", '--output',required=False, type=str,default=None,help="Specify the result set output directory.")
24-
@click.option("-p", '--package',required=False,type=str,default="",help="Specifies the package name information that needs to be scanned.")
25-
def android(inputs: str, rules: str, sniffer: bool, no_resource:bool, all:bool, threads:int, output, package:str) -> None:
23+
@click.option("-n", '--no-resource', is_flag=True, default=False, help="Ignore all resource files, including network sniffing. It is not enabled by default.")
24+
@click.option("-a", '--all', is_flag=True, default=False, help="Output the string content that conforms to the scan rules.It is on by default.")
25+
@click.option("-t", '--threads', required=False, type=int, default=10, help="Set the number of concurrency. The larger the concurrency, the faster the speed. The default value is 10.")
26+
@click.option("-o", '--output', required=False, type=str, default=None, help="Specify the result set output directory.")
27+
@click.option("-p", '--package', required=False, type=str, default="", help="Specifies the package name information that needs to be scanned.")
28+
def android(inputs: str, rules: str, sniffer: bool, no_resource: bool, all: bool, threads: int, output, package: str) -> None:
2629
try:
2730
bootstrapper = Bootstrapper(__file__, output, all, no_resource)
2831
bootstrapper.init()
@@ -31,15 +34,16 @@ def android(inputs: str, rules: str, sniffer: bool, no_resource:bool, all:bool,
3134
except Exception as e:
3235
raise e
3336

37+
3438
@cli.command(help="Get the key information of iOS system.")
3539
@click.option("-i", "--inputs", required=True, type=str, help="Please enter IPA file or ELF file to scan or corresponding IPA download address. App store is not supported at present.")
3640
@click.option("-r", "--rules", required=False, type=str, default="", help="Please enter a rule for temporary scanning of file contents.")
3741
@click.option("-s", "--sniffer", is_flag=True, default=False, help="Enable the network sniffer function. It is on by default.")
38-
@click.option("-n", '--no-resource', is_flag=True, default=False,help="Ignore all resource files, including network sniffing. It is not enabled by default.")
39-
@click.option("-a", '--all',is_flag=True, default=False,help="Output the string content that conforms to the scan rules.It is on by default.")
40-
@click.option("-t", '--threads',required=False, type=int,default=10,help="Set the number of concurrency. The larger the concurrency, the faster the speed. The default value is 10.")
41-
@click.option("-o", '--output',required=False, type=str,default=None,help="Specify the result set output directory.")
42-
def ios(inputs: str, rules: str, sniffer: bool, no_resource:bool, all:bool, threads:int, output:str) -> None:
42+
@click.option("-n", '--no-resource', is_flag=True, default=False, help="Ignore all resource files, including network sniffing. It is not enabled by default.")
43+
@click.option("-a", '--all', is_flag=True, default=False, help="Output the string content that conforms to the scan rules.It is on by default.")
44+
@click.option("-t", '--threads', required=False, type=int, default=10, help="Set the number of concurrency. The larger the concurrency, the faster the speed. The default value is 10.")
45+
@click.option("-o", '--output', required=False, type=str, default=None, help="Specify the result set output directory.")
46+
def ios(inputs: str, rules: str, sniffer: bool, no_resource: bool, all: bool, threads: int, output: str) -> None:
4347
try:
4448
bootstrapper = Bootstrapper(__file__, output, all, no_resource)
4549
bootstrapper.init()
@@ -48,15 +52,16 @@ def ios(inputs: str, rules: str, sniffer: bool, no_resource:bool, all:bool, thre
4852
except Exception as e:
4953
raise e
5054

55+
5156
@cli.command(help="Get the key information of Web system.")
5257
@click.option("-i", "--inputs", required=True, type=str, help="Please enter the site directory or site file to scan or the corresponding site download address.")
5358
@click.option("-r", "--rules", required=False, type=str, default="", help="Please enter a rule for temporary scanning of file contents.")
5459
@click.option("-s", "--sniffer", is_flag=True, default=False, help="Enable the network sniffer function. It is on by default.")
55-
@click.option("-n", '--no-resource', is_flag=True, default=False,help="Ignore all resource files, including network sniffing. It is not enabled by default.")
56-
@click.option("-a", '--all',is_flag=True, default=False,help="Output the string content that conforms to the scan rules.It is on by default.")
57-
@click.option("-t", '--threads',required=False, type=int,default=10,help="Set the number of concurrency. The larger the concurrency, the faster the speed. The default value is 10.")
58-
@click.option("-o", '--output',required=False, type=str,default=None,help="Specify the result set output directory.")
59-
def web(inputs: str, rules: str, sniffer: bool, no_resource:bool, all:bool, threads:int, output:str) -> None:
60+
@click.option("-n", '--no-resource', is_flag=True, default=False, help="Ignore all resource files, including network sniffing. It is not enabled by default.")
61+
@click.option("-a", '--all', is_flag=True, default=False, help="Output the string content that conforms to the scan rules.It is on by default.")
62+
@click.option("-t", '--threads', required=False, type=int, default=10, help="Set the number of concurrency. The larger the concurrency, the faster the speed. The default value is 10.")
63+
@click.option("-o", '--output', required=False, type=str, default=None, help="Specify the result set output directory.")
64+
def web(inputs: str, rules: str, sniffer: bool, no_resource: bool, all: bool, threads: int, output: str) -> None:
6065
try:
6166
bootstrapper = Bootstrapper(__file__, output, all, no_resource)
6267
bootstrapper.init()
@@ -65,9 +70,10 @@ def web(inputs: str, rules: str, sniffer: bool, no_resource:bool, all:bool, thre
6570
except Exception as e:
6671
raise e
6772

73+
6874
def main():
6975
cli()
7076

77+
7178
if __name__ == "__main__":
7279
main()
73-

config.py

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# com.alibaba.fastjson -> fastjson
99
# com.google.gson -> gson
1010
# com.fasterxml.jackson -> jackson
11-
# net.sf.json ->
11+
# net.sf.json ->
1212
# javax.xml.parsers.DocumentBuilder -> dom方式
1313
# javax.xml.parsers.SAXParser -> sax方式
1414
# org.jdom.input.SAXBuilder -> jdom
@@ -28,7 +28,7 @@
2828
# 1. https://以及http://开头的
2929
# 2. IPv4的ip地址
3030
# 3. URI地址,URI不能很好的拼接所以此处忽略
31-
filter_strs =[
31+
filter_strs = [
3232
r'https://.*|http://.*',
3333
# r'.*://([[0-9]{1,3}\.]{3}[0-9]{1,3}).*',
3434
r'.*://([\d{1,3}\.]{3}\d{1,3}).*',
@@ -50,79 +50,80 @@
5050
r'.*w3school.com.cn',
5151
r'.*apple.com',
5252
r'.*.amap.com',
53+
r'.*slf4j.org',
5354
]
5455

5556
# AK集合
5657
filter_ak_map = {
5758
"Aliyun_OSS": [
58-
r'.*accessKeyId.*".*"',
59-
r'.*accessKeySecret.*".*"',
60-
r'.*secret.*".*"'
59+
r'.*accessKeyId.*".*?"',
60+
r'.*accessKeySecret.*".*?"',
61+
r'.*secret.*".*?"'
6162
],
62-
#"Amazon_AWS_Access_Key_ID": r"([^A-Z0-9]|^)(AKIA|A3T|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{12,}",
63-
#"Amazon_AWS_S3_Bucket": [
64-
# r"//s3-[a-z0-9-]+\\.amazonaws\\.com/[a-z0-9._-]+",
65-
# r"//s3\\.amazonaws\\.com/[a-z0-9._-]+",
66-
# r"[a-z0-9.-]+\\.s3-[a-z0-9-]\\.amazonaws\\.com",
67-
# r"[a-z0-9.-]+\\.s3-website[.-](eu|ap|us|ca|sa|cn)",
68-
# r"[a-z0-9.-]+\\.s3\\.amazonaws\\.com",
69-
# r"amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
70-
#],
71-
#"Artifactory_API_Token": r"(?:\\s|=|:|\"|^)AKC[a-zA-Z0-9]{10,}",
72-
#"Artifactory_Password": r"(?:\\s|=|:|\"|^)AP[\\dABCDEF][a-zA-Z0-9]{8,}",
73-
# "Authorization_Basic": r"basic\\s[a-zA-Z0-9_\\-:\\.=]+",
74-
# "Authorization_Bearer": r"bearer\\s[a-zA-Z0-9_\\-:\\.=]+",
75-
#"AWS_API_Key": r"AKIA[0-9A-Z]{16}",
76-
#"Basic_Auth_Credentials": r"(?<=:\/\/)[a-zA-Z0-9]+:[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z]+",
77-
#"Cloudinary_Basic_Auth": r"cloudinary:\/\/[0-9]{15}:[0-9A-Za-z]+@[a-z]+",
78-
#"DEFCON_CTF_Flag": r"O{3}\\{.*\\}",
79-
#"Discord_BOT_Token": r"((?:N|M|O)[a-zA-Z0-9]{23}\\.[a-zA-Z0-9-_]{6}\\.[a-zA-Z0-9-_]{27})$",
80-
#"Facebook_Access_Token": r"EAACEdEose0cBA[0-9A-Za-z]+",
81-
#"Facebook_ClientID": r"[f|F][a|A][c|C][e|E][b|B][o|O][o|O][k|K](.{0,20})?['\"][0-9]{13,17}",
82-
#"Facebook_OAuth": r"[f|F][a|A][c|C][e|E][b|B][o|O][o|O][k|K].*['|\"][0-9a-f]{32}['|\"]",
83-
#"Facebook_Secret_Key": r"([f|F][a|A][c|C][e|E][b|B][o|O][o|O][k|K]|[f|F][b|B])(.{0,20})?['\"][0-9a-f]{32}",
84-
#"Firebase": r"[a-z0-9.-]+\\.firebaseio\\.com",
85-
#"Generic_API_Key": r"[a|A][p|P][i|I][_]?[k|K][e|E][y|Y].*['|\"][0-9a-zA-Z]{32,45}['|\"]",
86-
#"Generic_Secret": r"[s|S][e|E][c|C][r|R][e|E][t|T].*['|\"][0-9a-zA-Z]{32,45}['|\"]",
87-
#"GitHub": r"[g|G][i|I][t|T][h|H][u|U][b|B].*['|\"][0-9a-zA-Z]{35,40}['|\"]",
88-
#"GitHub_Access_Token": r"([a-zA-Z0-9_-]*:[a-zA-Z0-9_-]+@github.com*)$",
89-
#"Google_API_Key": r"AIza[0-9A-Za-z\\-_]{35}",
90-
#"Google_Cloud_Platform_OAuth": r"[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com",
91-
#"Google_Cloud_Platform_Service_Account": r"\"type\": \"service_account\"",
92-
#"Google_OAuth_Access_Token": r"ya29\\.[0-9A-Za-z\\-_]+",
93-
#"HackerOne_CTF_Flag": r"[h|H]1(?:[c|C][t|T][f|F])?\\{.*\\}",
94-
#"HackTheBox_CTF_Flag": r"[h|H](?:[a|A][c|C][k|K][t|T][h|H][e|E][b|B][o|O][x|X]|[t|T][b|B])\\{.*\\}$",
95-
#"Heroku_API_Key": r"[h|H][e|E][r|R][o|O][k|K][u|U].*[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}",
96-
# "IP_Address": r"(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])",
97-
#"JSON_Web_Token": r"(?i)^((?=.*[a-z])(?=.*[0-9])(?:[a-z0-9_=]+\\.){2}(?:[a-z0-9_\\-\\+\/=]*))$",
98-
# "LinkFinder": r"(?:\"|')(((?:[a-zA-Z]{1,10}:\/\/|\/\/)[^\"'\/]{1,}\\.[a-zA-Z]{2,}[^\"']{0,})|((?:\/|\\.\\.\/|\\.\/)[^\"'><,;| *()(%%$^\/\\\\\\[\\]][^\"'><,;|()]{1,})|([a-zA-Z0-9_\\-\/]{1,}\/[a-zA-Z0-9_\\-\/]{1,}\\.(?:[a-zA-Z]{1,4}|action)(?:[\\?|#][^\"|']{0,}|))|([a-zA-Z0-9_\\-\/]{1,}\/[a-zA-Z0-9_\\-\/]{3,}(?:[\\?|#][^\"|']{0,}|))|([a-zA-Z0-9_\\-]{1,}\\.(?:php|asp|aspx|jsp|json|action|html|js|txt|xml)(?:[\\?|#][^\"|']{0,}|)))(?:\"|')",
99-
#"Mac_Address": r"(([0-9A-Fa-f]{2}[:]){5}[0-9A-Fa-f]{2}|([0-9A-Fa-f]{2}[-]){5}[0-9A-Fa-f]{2}|([0-9A-Fa-f]{4}[\\.]){2}[0-9A-Fa-f]{4})$",
100-
#"MailChimp_API_Key": r"[0-9a-f]{32}-us[0-9]{1,2}",
101-
#"Mailgun_API_Key": r"key-[0-9a-zA-Z]{32}",
102-
#"Mailto": r"(?<=mailto:)[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9.-]+",
103-
#"Password_in_URL": r"[a-zA-Z]{3,10}://[^/\\s:@]{3,20}:[^/\\s:@]{3,20}@.{1,100}[\"'\\s]",
104-
#"PayPal_Braintree_Access_Token": r"access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}",
105-
#"PGP_private_key_block": r"-----BEGIN PGP PRIVATE KEY BLOCK-----",
106-
#"Picatic_API_Key": r"sk_live_[0-9a-z]{32}",
107-
#"RSA_Private_Key": r"-----BEGIN RSA PRIVATE KEY-----",
108-
#"Slack_Token": r"(xox[p|b|o|a]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32})",
109-
#"Slack_Webhook": r"https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}",
110-
#"Square_Access_Token": r"sq0atp-[0-9A-Za-z\\-_]{22}",
111-
#"Square_OAuth_Secret": r"sq0csp-[0-9A-Za-z\\-_]{43}",
112-
#"SSH_DSA_Private_Key": r"-----BEGIN DSA PRIVATE KEY-----",
113-
#"SSH_EC_Private_Key": r"-----BEGIN EC PRIVATE KEY-----",
114-
#"Stripe_API_Key": r"sk_live_[0-9a-zA-Z]{24}",
115-
#"Stripe_Restricted_API_Key": r"rk_live_[0-9a-zA-Z]{24}",
116-
#"TryHackMe_CTF_Flag": r"[t|T](?:[r|R][y|Y][h|H][a|A][c|C][k|K][m|M][e|E]|[h|H][m|M])\\{.*\\}$",
117-
#"Twilio_API_Key": r"SK[0-9a-fA-F]{32}",
118-
#"Twitter_Access_Token": r"[t|T][w|W][i|I][t|T][t|T][e|E][r|R].*[1-9][0-9]+-[0-9a-zA-Z]{40}",
119-
#"Twitter_ClientID": r"[t|T][w|W][i|I][t|T][t|T][e|E][r|R](.{0,20})?['\"][0-9a-z]{18,25}",
120-
#"Twitter_OAuth": r"[t|T][w|W][i|I][t|T][t|T][e|E][r|R].*['|\"][0-9a-zA-Z]{35,44}['|\"]",
121-
#"Twitter_Secret_Key": r"[t|T][w|W][i|I][t|T][t|T][e|E][r|R](.{0,20})?['\"][0-9a-z]{35,44}"
63+
# "Amazon_AWS_Access_Key_ID": r"([^A-Z0-9]|^)(AKIA|A3T|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{12,}",
64+
# "Amazon_AWS_S3_Bucket": [
65+
# r"//s3-[a-z0-9-]+\\.amazonaws\\.com/[a-z0-9._-]+",
66+
# r"//s3\\.amazonaws\\.com/[a-z0-9._-]+",
67+
# r"[a-z0-9.-]+\\.s3-[a-z0-9-]\\.amazonaws\\.com",
68+
# r"[a-z0-9.-]+\\.s3-website[.-](eu|ap|us|ca|sa|cn)",
69+
# r"[a-z0-9.-]+\\.s3\\.amazonaws\\.com",
70+
# r"amzn\\.mws\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
71+
# ],
72+
# "Artifactory_API_Token": r"(?:\\s|=|:|\"|^)AKC[a-zA-Z0-9]{10,}",
73+
# "Artifactory_Password": r"(?:\\s|=|:|\"|^)AP[\\dABCDEF][a-zA-Z0-9]{8,}",
74+
# "Authorization_Basic": r"basic\\s[a-zA-Z0-9_\\-:\\.=]+",
75+
# "Authorization_Bearer": r"bearer\\s[a-zA-Z0-9_\\-:\\.=]+",
76+
# "AWS_API_Key": r"AKIA[0-9A-Z]{16}",
77+
# "Basic_Auth_Credentials": r"(?<=:\/\/)[a-zA-Z0-9]+:[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z]+",
78+
# "Cloudinary_Basic_Auth": r"cloudinary:\/\/[0-9]{15}:[0-9A-Za-z]+@[a-z]+",
79+
# "DEFCON_CTF_Flag": r"O{3}\\{.*\\}",
80+
# "Discord_BOT_Token": r"((?:N|M|O)[a-zA-Z0-9]{23}\\.[a-zA-Z0-9-_]{6}\\.[a-zA-Z0-9-_]{27})$",
81+
# "Facebook_Access_Token": r"EAACEdEose0cBA[0-9A-Za-z]+",
82+
# "Facebook_ClientID": r"[f|F][a|A][c|C][e|E][b|B][o|O][o|O][k|K](.{0,20})?['\"][0-9]{13,17}",
83+
# "Facebook_OAuth": r"[f|F][a|A][c|C][e|E][b|B][o|O][o|O][k|K].*['|\"][0-9a-f]{32}['|\"]",
84+
# "Facebook_Secret_Key": r"([f|F][a|A][c|C][e|E][b|B][o|O][o|O][k|K]|[f|F][b|B])(.{0,20})?['\"][0-9a-f]{32}",
85+
# "Firebase": r"[a-z0-9.-]+\\.firebaseio\\.com",
86+
# "Generic_API_Key": r"[a|A][p|P][i|I][_]?[k|K][e|E][y|Y].*['|\"][0-9a-zA-Z]{32,45}['|\"]",
87+
# "Generic_Secret": r"[s|S][e|E][c|C][r|R][e|E][t|T].*['|\"][0-9a-zA-Z]{32,45}['|\"]",
88+
# "GitHub": r"[g|G][i|I][t|T][h|H][u|U][b|B].*['|\"][0-9a-zA-Z]{35,40}['|\"]",
89+
# "GitHub_Access_Token": r"([a-zA-Z0-9_-]*:[a-zA-Z0-9_-]+@github.com*)$",
90+
# "Google_API_Key": r"AIza[0-9A-Za-z\\-_]{35}",
91+
# "Google_Cloud_Platform_OAuth": r"[0-9]+-[0-9A-Za-z_]{32}\\.apps\\.googleusercontent\\.com",
92+
# "Google_Cloud_Platform_Service_Account": r"\"type\": \"service_account\"",
93+
# "Google_OAuth_Access_Token": r"ya29\\.[0-9A-Za-z\\-_]+",
94+
# "HackerOne_CTF_Flag": r"[h|H]1(?:[c|C][t|T][f|F])?\\{.*\\}",
95+
# "HackTheBox_CTF_Flag": r"[h|H](?:[a|A][c|C][k|K][t|T][h|H][e|E][b|B][o|O][x|X]|[t|T][b|B])\\{.*\\}$",
96+
# "Heroku_API_Key": r"[h|H][e|E][r|R][o|O][k|K][u|U].*[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}",
97+
# "IP_Address": r"(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])",
98+
# "JSON_Web_Token": r"(?i)^((?=.*[a-z])(?=.*[0-9])(?:[a-z0-9_=]+\\.){2}(?:[a-z0-9_\\-\\+\/=]*))$",
99+
# "LinkFinder": r"(?:\"|')(((?:[a-zA-Z]{1,10}:\/\/|\/\/)[^\"'\/]{1,}\\.[a-zA-Z]{2,}[^\"']{0,})|((?:\/|\\.\\.\/|\\.\/)[^\"'><,;| *()(%%$^\/\\\\\\[\\]][^\"'><,;|()]{1,})|([a-zA-Z0-9_\\-\/]{1,}\/[a-zA-Z0-9_\\-\/]{1,}\\.(?:[a-zA-Z]{1,4}|action)(?:[\\?|#][^\"|']{0,}|))|([a-zA-Z0-9_\\-\/]{1,}\/[a-zA-Z0-9_\\-\/]{3,}(?:[\\?|#][^\"|']{0,}|))|([a-zA-Z0-9_\\-]{1,}\\.(?:php|asp|aspx|jsp|json|action|html|js|txt|xml)(?:[\\?|#][^\"|']{0,}|)))(?:\"|')",
100+
# "Mac_Address": r"(([0-9A-Fa-f]{2}[:]){5}[0-9A-Fa-f]{2}|([0-9A-Fa-f]{2}[-]){5}[0-9A-Fa-f]{2}|([0-9A-Fa-f]{4}[\\.]){2}[0-9A-Fa-f]{4})$",
101+
# "MailChimp_API_Key": r"[0-9a-f]{32}-us[0-9]{1,2}",
102+
# "Mailgun_API_Key": r"key-[0-9a-zA-Z]{32}",
103+
# "Mailto": r"(?<=mailto:)[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9.-]+",
104+
# "Password_in_URL": r"[a-zA-Z]{3,10}://[^/\\s:@]{3,20}:[^/\\s:@]{3,20}@.{1,100}[\"'\\s]",
105+
# "PayPal_Braintree_Access_Token": r"access_token\\$production\\$[0-9a-z]{16}\\$[0-9a-f]{32}",
106+
# "PGP_private_key_block": r"-----BEGIN PGP PRIVATE KEY BLOCK-----",
107+
# "Picatic_API_Key": r"sk_live_[0-9a-z]{32}",
108+
# "RSA_Private_Key": r"-----BEGIN RSA PRIVATE KEY-----",
109+
# "Slack_Token": r"(xox[p|b|o|a]-[0-9]{12}-[0-9]{12}-[0-9]{12}-[a-z0-9]{32})",
110+
# "Slack_Webhook": r"https://hooks.slack.com/services/T[a-zA-Z0-9_]{8}/B[a-zA-Z0-9_]{8}/[a-zA-Z0-9_]{24}",
111+
# "Square_Access_Token": r"sq0atp-[0-9A-Za-z\\-_]{22}",
112+
# "Square_OAuth_Secret": r"sq0csp-[0-9A-Za-z\\-_]{43}",
113+
# "SSH_DSA_Private_Key": r"-----BEGIN DSA PRIVATE KEY-----",
114+
# "SSH_EC_Private_Key": r"-----BEGIN EC PRIVATE KEY-----",
115+
# "Stripe_API_Key": r"sk_live_[0-9a-zA-Z]{24}",
116+
# "Stripe_Restricted_API_Key": r"rk_live_[0-9a-zA-Z]{24}",
117+
# "TryHackMe_CTF_Flag": r"[t|T](?:[r|R][y|Y][h|H][a|A][c|C][k|K][m|M][e|E]|[h|H][m|M])\\{.*\\}$",
118+
# "Twilio_API_Key": r"SK[0-9a-fA-F]{32}",
119+
# "Twitter_Access_Token": r"[t|T][w|W][i|I][t|T][t|T][e|E][r|R].*[1-9][0-9]+-[0-9a-zA-Z]{40}",
120+
# "Twitter_ClientID": r"[t|T][w|W][i|I][t|T][t|T][e|E][r|R](.{0,20})?['\"][0-9a-z]{18,25}",
121+
# "Twitter_OAuth": r"[t|T][w|W][i|I][t|T][t|T][e|E][r|R].*['|\"][0-9a-zA-Z]{35,44}['|\"]",
122+
# "Twitter_Secret_Key": r"[t|T][w|W][i|I][t|T][t|T][e|E][r|R](.{0,20})?['\"][0-9a-z]{35,44}"
122123
}
123124

124125
# 此处配置壳信息
125-
shell_list =[
126+
shell_list = [
126127
'com.stub.StubApp',
127128
's.h.e.l.l.S',
128129
'com.Kiwisec.KiwiSecApplication',
@@ -150,7 +151,7 @@
150151
]
151152

152153
# 此处配置需要扫描的web文件后缀
153-
web_file_suffix =[
154+
web_file_suffix = [
154155
"html",
155156
"js",
156157
"xml",
@@ -163,7 +164,7 @@
163164
]
164165

165166
# 配置需要忽略网络嗅探的文件后缀名,此处根据具体需求进行配置,默认为不过滤
166-
sniffer_filter=[
167+
sniffer_filter = [
167168
"jpg",
168169
"png",
169170
"jpeg",
@@ -172,8 +173,8 @@
172173

173174
# 配置自动下载Apk文件或者缓存HTML的请求头信息
174175
headers = {
175-
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0",
176-
"Connection":"close"
176+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0",
177+
"Connection": "close"
177178
}
178179

179180
# 配置自动下载Apk文件或者缓存HTML的请求体信息
@@ -183,4 +184,3 @@
183184

184185
# 配置自动下载Apk文件或者缓存HTML的请求方法信息,目前仅支持GET和POST
185186
method = "GET"
186-

libs/core/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
download_flag = False
2727

2828
# excel 起始行号
29-
excel_row = 0
29+
excel_row = 1
3030

3131
class Bootstrapper(object):
3232

@@ -78,7 +78,7 @@ def __init__(self, path, out_path, all=False, no_resource= False):
7878
apktool_path = os.path.join(tools_dir, "apktool.jar")
7979
download_path = os.path.join(out_dir,"download")
8080
txt_result_path = os.path.join(out_dir,"result_"+str(create_time)+".txt")
81-
xls_result_path = os.path.join(out_dir,"result_"+str(create_time)+".xls")
81+
xls_result_path = os.path.join(out_dir,"result_"+str(create_time)+".xlsx")
8282
app_history_path = os.path.join(history_path,"app_history.txt")
8383
domain_history_path = os.path.join(history_path,"domain_history.txt")
8484

@@ -100,7 +100,6 @@ def init(self):
100100
print("[*] Create directory {}".format(output_path))
101101

102102
if not os.path.exists(download_path):
103-
# shutil.rmtree(download_path)
104103
os.makedirs(download_path)
105104
print("[*] Create directory {}".format(download_path))
106105

0 commit comments

Comments
 (0)