Skip to content
Open
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
13 changes: 11 additions & 2 deletions libs/core/parses.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,18 @@ def __get_string_by_file__(self, file_path):
def __ak_and_sk__(self, name, ak_rule, content):
akAndSkList = re.compile(ak_rule).findall(content)
for akAndSk in akAndSkList:
ak = ("[%s]-->:%s") % (name, akAndSk.strip())
if isinstance(akAndSk, tuple):
value = akAndSk[-1].strip()
else:
value = akAndSk.strip()

# 过滤空值
if not value:
continue

ak = ("[%s]-->:%s") % (name, value)
self.result_list.append(ak)
print(("[+] [%s] AK or SK in %s:") % (name, akAndSk.strip()))
print(("[+] [%s] AK or SK in %s:") % (name, value))

def __parse_string__(self, result):
# 通过正则筛选需要过滤的字符串
Expand Down