How to use the webtech.utils function in webtech

To help you get started, we’ve selected a few webtech examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kaiiyer / webtech / webtech_example.py View on Github external
import webtech

# you can use options, same as from the command line
wt = webtech.WebTech(args=None)

# scan a single website
report = wt.start_from_url('https://google.com', timeout=1)
print(report)

# scan multiple websites from a list 
for site in ['https://example.com', 'http://connectionerror']:
    try:
        report = wt.start_from_url(site, timeout=10)
        print("Site: {}".format(site))
        print(report)
    except webtech.utils.ConnectionException:
        print("Site unavailable: {}".format(site))

print("Done")
github ShielderSec / webtech / webtech_example.py View on Github external
wt = webtech.WebTech(options={'json': True})

# scan a single website
report = wt.start_from_url('https://google.com', timeout=1)
print(report)

# scan multiple websites from a list 
for site in ['https://shielder.it', 'http://connectionerror']:
    try:
        report = wt.start_from_url(site)

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

print("Done")