修改ready

This commit is contained in:
zhang hang
2016-07-13 11:34:03 +08:00
parent 55569e3d06
commit aa26fe0f7b
5 changed files with 5 additions and 89 deletions

View File

@@ -1,16 +1,16 @@
# sqlinj-ant # sqlinj-ant
、程序说明 ##一、程序说明
分布式、全覆盖、半自动化 sql注入扫描器 分布式、全覆盖、半自动化 sql注入扫描器
解决问题传统扫描器对post请求的无力对登录后请求的无力扫描效率低覆盖效果差 解决问题传统扫描器对post请求的无力对登录后请求的无力扫描效率低覆盖效果差
通过使用代理服务器主动提交的方式收集全部请求保存到redis中 通过使用代理服务器主动提交的方式收集全部请求保存到redis中可覆盖全部http接口
python调用sqlmapapi遍历上一步收集的url进行测试 python调用sqlmapapi遍历上一步收集的url进行测试通过多节点部署sqlmap极大提高识别效率
、文件说明 ##二、文件说明
. .
|____autoinj.py 调用sqlmapapi提供的api进行sql注入测试 对存在注入漏洞的请求返回请求信息 |____autoinj.py 调用sqlmapapi提供的api进行sql注入测试 对存在注入漏洞的请求返回请求信息
|____console.py 主程序 获取用户参数调用autoinj进行注入测试 |____console.py 主程序 获取用户参数调用autoinj进行注入测试
@@ -20,7 +20,7 @@ python调用sqlmapapi遍历上一步收集的url进行测试
|____proxy.conf nginx代理配置 记录http请求到redis |____proxy.conf nginx代理配置 记录http请求到redis
|____spider.py 没用的 |____spider.py 没用的
、使用说明 ##三、使用说明
1.环境要求 1.环境要求
python 2.7 python 2.7
redis redis

BIN
img/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

BIN
img/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 377 KiB

View File

@@ -1,27 +0,0 @@
import scrapy
class BlogSpider(scrapy.Spider):
name = 'youzuspider'
start_urls = ['http://www.youzu.com']
def parse(self, response):
hxs = HtmlXPathSelector(response)
items = []
newurls = hxs.select('//a/@href').extract()
validurls = []
for url in newurls:
#判断URL是否合法
if true:
validurls.append(url)
items.extend([self.make_requests_from_url(url).replace(callback=self.parse) for url in validurls])
sites = hxs.select('//ul/li')
items = []
for site in sites:
item = DmozItem()
item['title'] = site.select('a/text()').extract()
item['link'] = site.select('a/@href').extract()
item['desc'] = site.select('text()').extract()
items.append(item)

View File

@@ -1,57 +0,0 @@
#!/usr/bin/python
# -*- coding:utf-8 -*-
'''
通过一个url搜集同域下全部非静态资源并上报到redis
'''
import re
import sys
import urllib
import urlparse
import requests
#判断url是否同域
def samedomain(domain, urls):
rs = set()
for url in urls:
req = urlparse.urlparse(url)
if ("http" == req[0] or "https" == req[0]) and req[1] == domain:
rs.add(url)
elif len(req[0]) == 0:
path = req[2]
if path[0] != '/':
path = '/' + path
if len(req[4])>0:
path = path + "?" + req[4]
print path
rs.add("http://" + domain + path)
return rs
#通过页面代码提取
def queryUrl(domain, code):
#return re.findall('<a.*?href="?((\w|\.|:|\/|\?|=|&)*)"?.*</a>', code, re.I)
return re.findall("<a.*?href=\"([\w\.\:\/\?\=\&%]+)\"", code, re.I)
def crossfire(url):
req = urlparse.urlparse(url)
domain = req[1]
code = requests.get(url).text
allurl = queryUrl(domain, code)
return samedomain(domain, allurl)
def main():
if len(sys.argv) < 2:
print "缺少参数: python %s http://hostname" % sys.argv[0]
exit()
url = sys.argv[1]
level = 3
urls = crossfire(url)
for url in urls:
print url
urls = urls | crossfire(url)
print urls
if __name__ == '__main__':
main()