def main(): args = vars(cliparser.options) if not args.get('url'): cliparser.parser.error('URL is required. Run with -h for help.') checks.check_template_injection(Channel(args))
def test_detection(self): channel = Channel({'url': self.url, 'level': 5, 'injection_tag': '*'}) check_template_injection(channel) # Delete OS to make the tests portable if 'os' in channel.data: del channel.data['os'] # Delete any unreliable engine detected if 'unreliable' in channel.data: del channel.data['unreliable'] self.assertEqual( channel.data, self.expected_data, )
def test_detection(self): channel = Channel({ 'url' : self.url, 'level': 5 }) check_template_injection(channel) # Delete OS to make the tests portable if 'os' in channel.data: del channel.data['os'] # Delete any unreliable engine detected if 'unreliable' in channel.data: del channel.data['unreliable'] self.assertEqual( channel.data, self.expected_data, )