Python 批量漏洞扫描工具:图形化界面一键扫描
#!/usr/bin/env python
-- coding:utf-8 --
import wx import os
class MyFrame(wx.Frame): def init(self): wx.Frame.init(self,None,-1,'Vulnerable Scanning Tool',size=(800,600)) panel = wx.Panel(self)
#wx.StaticBox(panel, -1, 'Target', (20, 20), size=(760, 160))
wx.StaticText(panel, -1, 'Target IP:', (30, 30))
self.targetIp = wx.TextCtrl(panel, -1, '', size=(200, 25), pos=(100,30))
wx.StaticText(panel, -1, 'Port:', (370, 30))
self.targetPort = wx.TextCtrl(panel, -1, '', size=(200, 25), pos=(440,30))
wx.StaticText(panel, -1, 'Vulnerability:', (30,70))
self.vulnType = wx.ComboBox(panel, -1, size=(200,25), pos=(100,70), choices=['SQL Injection', 'XSS', 'CSRF', 'Command Execution'])
wx.StaticText(panel, -1, 'Gobuster Dir:', (370,70))
self.gobusterDir = wx.TextCtrl(panel, -1, '', size=(200, 25), pos=(440,70))
self.scanBtn = wx.Button(panel, -1, 'Start Scanning', pos=(320,120))
self.Bind(wx.EVT_BUTTON, self.OnClick, self.scanBtn)
self.resultView = wx.ListCtrl(panel, -1, size=(760,360), pos=(20,170), style=wx.LC_REPORT)
self.resultView.InsertColumn(0, 'IP', width=200)
self.resultView.InsertColumn(1, 'Port', width=120)
self.resultView.InsertColumn(2, 'Vulnerability', width=200)
self.resultView.InsertColumn(3, 'Exploit', width=240)
def OnClick(self, evt):
targetIp = self.targetIp.GetValue()
targetPort = self.targetPort.GetValue()
vulnType = self.vulnType.GetValue()
gobusterDir = self.gobusterDir.GetValue()
# Run SQL Injection Scan
if vulnType == 'SQL Injection':
sqlCmd = 'sqlmap -u http://%s:%s --dbs' % (targetIp, targetPort)
os.system(sqlCmd)
# Run XSS Scan
elif vulnType == 'XSS':
xssCmd = 'xsser -u http://%s:%s --inject' % (targetIp, targetPort)
os.system(xssCmd)
# Run CSRF Scan
elif vulnType == 'CSRF':
csrfCmd = 'csrf-scanner -u http://%s:%s --inject' % (targetIp, targetPort)
os.system(csrfCmd)
# Run Command Execution Scan
elif vulnType == 'Command Execution':
ceCmd = 'gobuster -u http://%s:%s -w %s' % (targetIp, targetPort, gobusterDir)
os.system(ceCmd)
# Update result to ListCtrl
self.resultView.Append((targetIp, targetPort, vulnType, 'null'))
app = wx.App() frame = MyFrame() frame.Show() app.MainLoop()
原文地址: https://www.cveoy.top/t/topic/lmsI 著作权归作者所有。请勿转载和采集!