Skip to content

Commit f6a5fbe

Browse files
committed
Update sploitscan.py
Fixed crash if no exploits were found #25
1 parent 49f157a commit f6a5fbe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sploitscan/sploitscan.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def template(data):
292292

293293

294294
def display_public_exploits(github_data, vulncheck_data, exploitdb_data, packetstorm_data, nuclei_data, vulncheck_error=None):
295-
def template(data):
295+
def template():
296296
total_exploits = 0
297297
entries = []
298298

@@ -358,11 +358,11 @@ def template(data):
358358
entries.append(f" └ {other_entries[-1]}")
359359

360360
if not entries:
361-
return ["└ ❌ No data found."]
361+
return ["└ ❌ No data found."], total_exploits
362362

363363
return entries, total_exploits
364364

365-
exploits, total = template(True)
365+
exploits, total = template()
366366
print(f"┌───[ {BLUE}💣 Public Exploits (Total: {total}){ENDC} ]")
367367
if exploits:
368368
print("|")
@@ -373,6 +373,7 @@ def template(data):
373373
print("|")
374374
print(f"└ ❌ No data found.\n")
375375

376+
376377
def display_hackerone_data(hackerone_data, error=None):
377378
def template(data):
378379
if not data or "data" not in data or "cve_entry" not in data["data"]:

0 commit comments

Comments
 (0)