Skip to content

Commit

Permalink
fixing : local ouput
Browse files Browse the repository at this point in the history
  • Loading branch information
xcapri committed Dec 15, 2024
1 parent a80393d commit e10e53a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
author='xcapri',
author_email='N/A',
url='https://github.com/xcapri/subdosec',
version='0.7',
version='0.8',
package_data={"subdosec_": ["config/*"]},
include_package_data=True,
packages=find_packages(),
Expand Down
12 changes: 8 additions & 4 deletions subdosec
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,14 @@ def analyze_target(target, mode, apikey, output_scan, host_scan, host_scan_prod,
web_data = next(item.get('website_data') for item in match_response if item.get('isMatched'))
fingerprint_id = next(item.get('service').get('fid') for item in match_response if item.get('isMatched'))

action = save_local if o else vuln_site
print(f" [VULN] {'[SAVED]' if o else f'{output_scan}{service}'}")
asyncio.run(action(web_data, fingerprint_id, apikey if not o else o, host_scan_prod, mode))

msg = " [VULN] [SAVED]" if o else f" [VULN] {output_scan}{service}"
print(msg)

if o:
asyncio.run(save_local(web_data, service, fingerprint_id, o))
else:
asyncio.run(vuln_site(web_data, fingerprint_id, apikey, host_scan_prod, mode))

elif not vuln_only:
print(f" [UNDETECT]")
asyncio.run(undetect_site(match_response[0], apikey, host_scan_prod, mode))
Expand Down
10 changes: 7 additions & 3 deletions subdosec_/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,13 @@ def analyze_target(target, mode, apikey, output_scan, host_scan, host_scan_prod,
web_data = next(item.get('website_data') for item in match_response if item.get('isMatched'))
fingerprint_id = next(item.get('service').get('fid') for item in match_response if item.get('isMatched'))

action = save_local if o else vuln_site
print(f" [VULN] {'[SAVED]' if o else f'{output_scan}{service}'}")
asyncio.run(action(web_data, fingerprint_id, apikey if not o else o, host_scan_prod, mode))
msg = " [VULN] [SAVED]" if o else f" [VULN] {output_scan}{service}"
print(msg)

if o:
asyncio.run(save_local(web_data, service, fingerprint_id, o))
else:
asyncio.run(vuln_site(web_data, fingerprint_id, apikey, host_scan_prod, mode))

elif not vuln_only:
print(f" [UNDETECT]")
Expand Down

0 comments on commit e10e53a

Please sign in to comment.