我们在做渗透的时候肯定会用上扫描器的,本人一般会用御剑,当然你也会喜欢别的工具。
很多时候,能否渗透成功其实还挺依赖与字典的,如果把后台给扫出来了,恰好还弱口令,那么岂不是美滋滋。

因此,有一个好的字典是至关重要的。当然了,大佬们渗透多年肯定已经收藏了很多好用的字典了,但是吧,很多时候一个asp的字典里还有aspx啊,php啊,jsp啊等等不相关的东西,
如果不相关的东西多了就会降低扫描的效率了,因此我们需要一个用来整理的工具,可以让我们肆无忌惮的到处收集字典,然后整合到自己的字典库中

创建个data目录  把需要去重和分类的txt文件放到里面
请用python3.X执行

用法如下

python datahanle.py
#!/usr/bin/env python
# -*- conding:utf-8 -*-
import os,re data =[]
asp = []
aspx = []
php = []
jsp = []
mdb = []
dirx = [] def file_name():
for files in os.walk("data"):
#print(files[2]) #当前路径下文件
pass
return files[2]
def datas(dir):
with open("%s"%dir,"r",encoding="gb18030") as f:
for i in f.readlines():
data.append(i)
dirs =file_name()
for i in dirs:
datas("data/%s"%(i))
print("一共有%s条路径"%(len(data)))
data = list(set(data))
print("去重后一共还有%s条路径"%(len(data))) count_asp = 0
count_aspx = 0
count_jsp = 0
count_php = 0
count_dirx = 0
count_mdb = 0 data = sorted(data) #对列表排序 for i in data:
#rule = re.compile(r".*?asp",re.I)
res = re.search('.*?\.asp',i,flags=re.I)
if res == None:
res = re.search('.*?\.mdb', i, flags=re.I)
if res == None:
res = re.search('.*?\.php', i, flags=re.I)
if res == None:
res = re.search('.*?\.jsp', i, flags=re.I)
if res == None:
dirx.append(i)
count_dirx +=1
else:
jsp.append(i)
count_jsp +=1
else:
php.append(i)
count_php +=1
else:
mdb.append(i)
count_mdb += 1
else:
res = re.search('.*?\.aspx', i, flags=re.I)
if res == None:
asp.append(i)
count_asp+=1
else:
aspx.append(i)
count_aspx +=1 print("asp:%s aspx:%s php:%s jsp:%s dir:%s mdb:%s"%(count_asp,count_aspx,count_php,count_jsp,count_dirx,count_mdb))
with open('nwe_asp.txt','a',encoding='utf-8') as f:
for i in asp:
f.write(i) with open('nwe_aspx.txt','a',encoding='utf-8') as f:
for i in aspx:
f.write(i) with open('nwe_php.txt','a',encoding='utf-8') as f:
for i in php:
f.write(i) with open('nwe_jsp.txt','a',encoding='utf-8') as f:
for i in jsp:
f.write(i) with open('nwe_mdb.txt','a',encoding='utf-8') as f:
for i in mdb:
f.write(i) with open('nwe_dir.txt','a',encoding='utf-8') as f:
for i in dirx:
f.write(i)

去重和分类后缀asp、php等路径 用python3写的的更多相关文章

  1. Asp.net项目路径获取方法【转】

    获取项目完整的绝对路径string path = System.AppDomain.CurrentDomain.BaseDirectory.ToString();string path = Serve ...

  2. ASP.NET获取路径的方法

    原文:[转载]ASP.NET获取路径的方法 HttpContext.Current.Request.PhysicalPath;    // 获得当前页面的完整物理路径.比如 F:\XFU.NSQS\p ...

  3. 关于ASP.Net中路径的问题

    比如你的工程是Webapplication1(url是:http://localhost/webapplication1/webform1.aspx) Request.ApplicationPath ...

  4. 2强类型DataSet (2011-12-30 23:16:59)转载▼ 标签: 杂谈 分类: Asp.Net练习笔记 http://blog.sina.com.cn/s/blog_9d90c4140101214w.html

    强类型DataSet (2011-12-30 23:16:59) 转载▼ 标签: 杂谈 分类: Asp.Net练习笔记 using System; using System.Collections.G ...

  5. 强类型DataSet (2011-12-30 23:16:59)转载▼ 标签: 杂谈 分类: Asp.Net练习笔记 http://blog.sina.com.cn/s/blog_9d90c4140101214w.html

    强类型DataSet (2011-12-30 23:16:59) 转载▼ 标签: 杂谈 分类: Asp.Net练习笔记 using System; using System.Collections.G ...

  6. [置顶] Asp.Net底层原理(二、写自己的Asp.Net框架)

    我们介绍过了浏览器和服务器之间的交互过程,接下来介绍Asp.net处理动态请求. 写自己的Asp.Net框架,我们不会引用System.Web这个程序集,我们只需要创建要给自己的类库,所以在接下来的程 ...

  7. direct path read/write (直接路径读/写)

    转载:http://www.dbtan.com/2010/04/direct-path-readwrite.html direct path read/write (直接路径读/写): 直接路径读(d ...

  8. Http,Https (SSL)的Url绝对路径,相对路径解决方案Security Switch 4.2 中文帮助文档 分类: ASP.NET 2014-10-28 14:09 177人阅读 评论(1) 收藏

    下载地址1:https://securityswitch.googlecode.com/files/SecuritySwitch%20v4.2.0.0%20-%20Binary.zip 下载地址2:h ...

  9. Http,Https(SSL)的Url绝对路径,相对路径解决方案Security Switch 4.2的配置和使用 分类: ASP.NET 2014-11-05 12:51 97人阅读 评论(0) 收藏

    下载地址1:https://securityswitch.googlecode.com/files/SecuritySwitch%20v4.2.0.0%20-%20Binary.zip 下载地址2:h ...

随机推荐

  1. Android : 高通平台Camera调试之SetpropKey/camxoverridesettings.txt

    高通相关网址:Createpoint: https://createpoint.qti.qualcomm.com(可下载文档,Release Note等)Chipcode: https://chipc ...

  2. .net回复图片

    using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web. ...

  3. JAVAEE 第六周

    JSF 生命周期: FacesServlet 充当用户和 JSF 应用程序之间的纽带.它在明确限定的 JSF 生命周期(规定了用户请求之间的整个事件流)的范围内工作. 1.   当JSF页面上的一个事 ...

  4. RAID配置多阵列

    感谢: https://www.cnblogs.com/hystj/articles/8672029.html

  5. Beta冲刺三

    Beta冲刺三 1.团队TSP 团队任务 预估时间 实际时间 完成日期 对数据库的最终完善 120 150 12.2 对学生注册功能的完善——新增触发器 150 140 11.29 对教师注册功能的完 ...

  6. jmeter之headers中的Content-Type.

    jmeter在发送http post请求时,会把body  里的数据格式给携带上(最好携带上),一般在信息头里增加.另因一篇文章.感觉写的非常好.https://imququ.com/post/fou ...

  7. vue爬坑:把对象中的数据给了某个变量,改变一个对象的值,另一个对象也变化

    今天做项目碰到了 一个坑,一个vue变量赋值给一个新的变量,对这个新的变量里的值做更改,vue的变量也变了.记录一下这个坑坑~~ 然后百度搜到了一个解决方案: 就是把变量先转成字符串,再把字符串转成对 ...

  8. ForkJoinPool 源码

    ForkJoinPool----FJP先看task.fork方法,含义是将当前任务,放到当前线程的工作队列中.但是第一次执行这个方法是在主线程中,主线程是不可能被FJP管理的.那么就进入ForkJoi ...

  9. 用Spring Boot去创建web service

    1. 环境 JDK1.8 JavaSE1.8 web容器是 webSphere IDE是Eclipse 2. 创建一个空的 Maven Project 3. 打开pom.xml 配置相应的packag ...

  10. 【原创】Arduino、arm、树莓派与单片机

    Arduino是一个由开源软件环境支持的开源硬件原型平台.包含硬件(各种型号Arduino板)和软件(Arduino IDE).集成开发环境是Arduino IDE ,编写和编译sketch后通过US ...