How to use the webtech.WebTech 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
#!/usr/bin/env python3
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 kaiiyer / webtech / Burp-WebTech.py View on Github external
def registerExtenderCallbacks(self, callbacks):
        self.callbacks = callbacks
        self.helpers = callbacks.getHelpers()
        callbacks.setExtensionName("WebTech")
        self.out = callbacks.getStdout()
        self.callbacks.printOutput("Sucessfully loaded WebTech {}".format(VERSION))

        try:
            self.webtech = WebTech(options={'json': True})
        except UpdateInBurpException as e:
            #self.callbacks.printOutput(e)
            for db_file in databases:
                db = self.callbacks.makeHttpRequest(
                    'raw.githubusercontent.com', # we are hardcoding this since there isn't a nice api for that
                    443,
                    True,
                    self.helpers.buildHttpRequest(URL(db_file[0]))
                );
                db = db.tostring()
                save_database_file(db[db.index("\r\n\r\n") + len("\r\n\r\n"):], db_file[1])
            self.webtech = WebTech(options={'json': True})

        # define all checkboxes
        self.cbPassiveChecks = self.defineCheckBox("Enable Passive Scanner Checks")
        self.cbActiveChecks = self.defineCheckBox("Enable Active Scanner Checks", True, False)
github ShielderSec / webtech / Burp-WebTech.py View on Github external
def registerExtenderCallbacks(self, callbacks):
        self.callbacks = callbacks
        self.helpers = callbacks.getHelpers()
        callbacks.setExtensionName("WebTech")
        self.out = callbacks.getStdout()
        self.callbacks.printOutput("Sucessfully loaded WebTech {}".format(VERSION))

        self.webtech = WebTech(options={'json': True})

        # define all checkboxes
        self.cbPassiveChecks = self.defineCheckBox("Enable Passive Scanner Checks")
        self.cbActiveChecks = self.defineCheckBox("Enable Active Scanner Checks", True, False)
        self.btnSave = JButton("Set as default", actionPerformed=self.saveConfig)
        self.btnRestore = JButton("Restore", actionPerformed=self.restoreConfig)
        self.grpConfig = JPanel()
        self.grpConfig.add(self.btnSave)
        self.grpConfig.add(self.btnRestore)
        self.restoreConfig()

        # definition of config tab
        self.tab = JPanel()
        layout = GroupLayout(self.tab)
        self.tab.setLayout(layout)
        layout.setAutoCreateGaps(True)
github ShielderSec / webtech / webtech_example.py View on Github external
#!/usr/bin/env python3
import webtech

# you can use options, same as from the command line
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))