Skip to content

Commit

Permalink
fixing minor issues in running webtech_example.py (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbjoshi1309 authored Apr 26, 2020
1 parent f87fa34 commit 09391d7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions webtech_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import webtech

# you can use options, same as from the command line
wt = webtech.WebTech(options={'json': True})
wt = webtech.WebTech(args=None)

# scan a single website
report = wt.start_from_url('https://google.com', timeout=1)
Expand All @@ -11,12 +11,9 @@
# scan multiple websites from a list
for site in ['https://example.com', 'http://connectionerror']:
try:
report = wt.start_from_url(site)

techs = report['tech']
report = wt.start_from_url(site, timeout=10)
print("Site: {}".format(site))
for tech in techs:
print(" - {}".format(tech))
print(report)
except webtech.utils.ConnectionException:
print("Site unavailable: {}".format(site))

Expand Down

0 comments on commit 09391d7

Please sign in to comment.