Пример #1
0
	def run(self):
		try:
			# basic mode scanner
			if self.arg['mode'] == '1':
				sn = Scanner(server=self.server,token=self.token,\
					target=self.arg['target'],\
					threads=int(self.arg['global']['threads']) if self.arg['global']['threads']!= '' else None,\
					loglevel=self.arg['global']['loglevel'] if self.arg['global']['loglevel']!= '' else 'INFO',\
					gatherdepth=int(self.arg['global']['gatherdepth']) if self.arg['global']['gatherdepth']!= '' else 1)
				sn.initInfo()
				sn.infoGather()
				sn.scan()
			# plugin mode scanner
			elif self.arg['mode'] == '2':
				sn = PluginMultiRunner(server=self.server,token=self.token,\
					target=self.arg['target'],\
					threads=int(self.arg['global']['threads']) if self.arg['global']['threads']!= '' else None,\
					pluginfilepath=self.arg['pluginfilepath'],\
					pluginargs=self.arg['pluginargs'])
				sn.initInfo()
				sn.scan()
		except IndexError,e:
		# except Exception,e:
			print 'Exception',e
Пример #2
0
 def run(self):
     try:
         # basic mode scanner
         if self.arg['mode'] == '1':
             sn = Scanner(server=self.server,token=self.token,\
              target=self.arg['target'],\
              threads=int(self.arg['global']['threads']) if self.arg['global']['threads']!= '' else None,\
              loglevel=self.arg['global']['loglevel'] if self.arg['global']['loglevel']!= '' else 'INFO',\
              gatherdepth=int(self.arg['global']['gatherdepth']) if self.arg['global']['gatherdepth']!= '' else 1)
             sn.initInfo()
             sn.infoGather()
             sn.scan()
         # plugin mode scanner
         elif self.arg['mode'] == '2':
             sn = PluginMultiRunner(server=self.server,token=self.token,\
              target=self.arg['target'],\
              threads=int(self.arg['global']['threads']) if self.arg['global']['threads']!= '' else None,\
              pluginfilepath=self.arg['pluginfilepath'],\
              pluginargs=self.arg['pluginargs'])
             sn.initInfo()
             sn.scan()
     except IndexError, e:
         # except Exception,e:
         print 'Exception', e
Пример #3
0
			_token = arg
		elif opt in ('-U','--update-plugins'):
			if arg:
				_pluginpath = arg
			else:
				_pluginpath = 'plugins/'
		else:
			pass

	if _server and _token:
		if '_pluginpath' in dir():
			# print '_pluginpath=',_pluginpath
			# print '_server=',_server
			# print '_token=',_token
			loadPlugins(_pluginpath,_server,_token)

		elif '_target' in dir():
			sn = Scanner(_server,_token,_target)
			sn.initInfo()
			sn.infoGather()
			sn.scan()

		else:
			usage()
	else:
		usage()
# ----------------------------------------------------------------------------------------------------
# 
# ----------------------------------------------------------------------------------------------------
if __name__=='__main__':
	main()
Пример #4
0
            if arg:
                _pluginpath = arg
            else:
                _pluginpath = 'plugins/'
        else:
            pass

    if _server and _token:
        if '_pluginpath' in dir():
            # print '_pluginpath=',_pluginpath
            # print '_server=',_server
            # print '_token=',_token
            loadPlugins(_pluginpath, _server, _token)

        elif '_target' in dir():
            sn = Scanner(_server, _token, _target)
            sn.initInfo()
            sn.infoGather()
            sn.scan()

        else:
            usage()
    else:
        usage()


# ----------------------------------------------------------------------------------------------------
#
# ----------------------------------------------------------------------------------------------------
if __name__ == '__main__':
    main()