python网站目录爬行

default.php
index.php
view.html.php
helper.php
controller.php
frontend.php
backend.php
colorConfig.ini.php
config.php
router.php
view.php
search.php
user.php
menu.php
admin.php
main.php
header.php
form.php
modules.php
installer.php
footer.php
component.php
navigation.php
xoops_version.php
functions.php
login.php
core.write_file.php
core.rmdir.php
core.rm_auto.php
core.php
core.is_trusted.php
core.is_secure.php
category.php
modifier.upper.php
modifier.strip.php
modifier.spacify.php
modifier.replace.php
modifier.nl2br.php
modifier.lower.php
modifier.indent.php
modifier.escape.php
modifier.default.php
modifier.cat.php
function.popup.php
function.math.php
function.mailto.php
function.fetch.php
function.eval.php
function.debug.php
function.cycle.php
function.counter.php
compiler.assign.php
block.textformat.php
Smarty.class.php
style.php
vars.php
comment.php
newsletter.php
media.php
blockStyle.php
publisher.php
default_items.php
template.php
default_item.php
index2.php
configuration.php
image.php
categories.php
contact.php
content.php
blog_item.php
cache.php
block.php
upload.php
pagination.php
guestbook.php
poll.php
mailmanweb.php
joomla.php
install.php
file.php
articleweb.php
blog.php
mail.php
application.php
PEAR.php
register.php
module.php
list.php
error.php
database.php
banner.php
archive.php
about.php
update.php
languages.php
default_form.php
comments.php
CHANGELOG.php
weblinks.php
version.php
upgrade.php
LICENSE.php
view.feed.php
specials.php
sidebar.php
setup.php
phpinfo.php
mysql.php
modinfo.php
index.class.php
connector.php
config.inc.php
banners.php
admin.class.php
util.php
users.php
profile.php
plugin.php
help.php
example.php
client.php
calendar.php
xml.php
sql.php
news.php
import.php
fckeditor.php
english.php
csshelpers.php
class.smtp.php
class.phpmailer.php
blog_links.php
COPYRIGHT.php
testTypo.php
testForms.php
item.php
framework.php
defines.php
default_message.php
database_changes.php
customers.php
currencies.php
common.php
CREDITS.php
weblink.php
section.php
pagebreak.php
page.php
message.php
legacy.php
io.php
geshi.php
event.php
edit.php
LICENSES.php
INSTALL.php
File.php
orders.php
language.php
faq.php
commands.php
basexml.php
zones.php
xmlrpc.php
smtp.php
session.php
reviews.php
logout.php
info.php
index3.php
html.php
element.php
confirm.php
auth.php
whos_online.php
toolbar.php
single.php
plugins.php
ini.php
en_US.php
email.php
backup.php
article.php
xml_domit_rss.php
widgets.php
test.php
spellchecker.php
posting.php
pathway.php
pageNavigation.php
nl_NL.php
newsfeeds.php
newsfeed.php
manufacturers.php
manager.php
mailto.php
log.php
it_IT.php
frontpage.php
de_DE.php
cs_CZ.php
countries.php
comment_post.php
comment_edit.php
comment_delete.php
cms.php
view.raw.php
vcard.php
upgrade_config.php
theme.php
text.php
tax_rates.php
tax_classes.php
stats_customers.php
server_info.php
ru_RU.php
packingslip.php
orders_status.php
none.php
newsletters.php
nb_NO.php
link.php
invoice.php
information.php
getimage.php
geo_zones.php
ftp.php
export.php
events.php
editor_registry.php
editor.php
cpanel.php
comment_reply.php
comment_new.php
banner_manager.php
Length.php
vrtour.php
sv_SE.php
submit.php
sessions.php
popup.php
php.php
panorama.php
mysqli.php
museum.php
mod_login.php
mod_footer.php
mod_feed.php
memberlist.php
lt_LT.php
ldap.php
index_def.php
index.php.initial
images.php
home.php
general.php
gallery.php
fr_FR.php
folder.php
fi_FI.php
fastsearch.php.save
fastsearch.php
exhibits.php
exhibitions.php
exhibitdetails.php
events_photo.php
download.php
dig_exhib.php
da_DK.php
collections.php
captcha.php
about1.php
Thumbnail.php
Text.php
Tar.php
3d_exhibits1.php
3d_exhibits.php
3D_preview.php
xcache.php
viewonline.php
vert.php
uploadbusplan.php
tree.php
thumbs.php
storage.php
sitemap.php
shopping_cart.php
settings.php
search.inc.php
sampleposteddata.php
sample04.php
sample03.php
sample02.php
sample01.php
rss.php
route.php
post.php
object.php
mod_stats.php
misc.php
memcache.php
loader.php
ja_JP.php
hu_HU.php
horiz.php
forums.php
file_manager.php
feed.php
fckeditor_php5.php
fckeditor_php4.php
fantversion.php
et_EE.php
es_ES.php
define_language.php
default_links.php
default_error.php
default_address.php
author.php
apc.php
_item.php
URI.php
JSON.php
404.php
workshop1.php
viewtopic.php
viewforum.php
uninstall.php
tinymce.php
textarea.php
tcpdf.php
tag.php
strlen.php
sponsors.php
sendmail.php
searchform.php
schinese_utf8.php
schinese.php
profiler.php
pdf.php
menuleft.php
javascript.php
history.php
eaccelerator.php
default_results.php
default_logout.php
default_login.php
default_graph.php
cron.php
copy.php
complete.php
case.php
bannerclient.php
Translate.php
PEAR5.php
Img.php
zip.php
workshop.php
vcard.class.php
timetable.php
timer.php
themes.php
temp.php
table.php
string.php
simplepie.php
setting.ini.php
server.php
random.php
pressrelease.php
pl_PL.php
phpcompat.php
password.php
order.php
notification.php
move.php
modcp.php
messages.php
mamboxml.php
mambo.php
loop.php
logoff.php
inputfilter.php
index.php.bak
head.php
groupcp.php
global.php
german.php
gacl_api.class.php
gacl.class.php
factory.php
en.php
edituser.php
downloads.php
default_raw.php
database.mysqli.php
contacts.php
compat.php
behavior.php
awards.php
admin_header.php
Tidy.php
Server.php
Name.php
HTML_toolbar.php
Files.php
Default.php
Common.php
zip.lib.php
xstandard.php
xmlrpcs.php
xmlrpc_wrappers.php
xml_saxy_shared.php
xml_saxy_parser.php
xml_domit_xpath.php
xml_domit_shared.php
xml_domit_parser.php
xml_domit_doctor.php
xml_domit_cache.php
wrapper.php
workshop1.php.orig
winners3.php
winners2.php
winners1.php
winners.php
wic.php
wia.php
vote.php
utf8.php
uploadfile.php
uploader.php
uploaddogs.php
uploadbplan.php

dir.txt

import requests
import xlwt
from tkinter import *
import threading
import time

global head
global excel
global sheet
global url
global l

def GUI():
    global url
    global l
    win = Tk()
    win.title("网站目录爬行_Create by lao1ao")
    win.geometry("800x500")

    def ToClicked():
        global url
        global excel
        global sheet
        global head
        global url
        global l

        ‘‘‘
        http头配置
        ‘‘‘
        head = {  ‘User-Agent‘: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36‘  }
        url=uurl.get()
        ‘‘‘
        创建一张excel表名字叫code.xls,放所有的状态
        ‘‘‘
        excel = xlwt.Workbook(encoding=‘utf-8‘, style_compression=0)
        sheet = excel.add_sheet(‘code‘, cell_overwrite_ok=True)
        sheet.write(0, 0, ‘序号‘)
        sheet.write(0, 1, ‘URL‘)
        sheet.write(0, 2, ‘状态码‘)
        ‘‘‘
        读入字典库
        ‘‘‘
        with open(ddir.get(), ‘+r‘, encoding=‘utf-8‘, errors=‘ignore‘) as f:
            texts = f.read()
        ‘‘‘
        开始扫描
        ‘‘‘
        dirpass=texts.split()
        id = 0
        for i in dirpass:
            try:
                re = requests.get(url=url + i, headers=head, timeout=1)
                if re.status_code == 200:
                    with open(‘./code200.txt‘, ‘a‘, encoding=‘utf-8‘) as f:
                        f.write(url + i + ‘\n‘)
                else:
                    id += 1
                    s="【"+str(id)+"】"+" : "+url+i
                    l.insert(END,s)
                    SaveforExcel(id, url + i, re.status_code)
            except:
                pass
    ‘‘‘
    画布设置
    ‘‘‘
    Label(win, text=‘请输入要遍历的URL:‘, font=(‘微软雅黑‘)).place(x=10, y=10)
    e1 = StringVar()
    uurl = Entry(win, width=50, textvariable=e1, font=(‘微软雅黑‘, 10), fg=‘green‘)
    uurl.place(x=180, y=10)
    e1.set("http://192.168.171.134/")

    Label(win, text=‘请输入字典:‘, font=(‘微软雅黑‘)).place(x=10, y=50)
    e2 = StringVar()
    ddir = Entry(win, width=50, textvariable=e2, font=(‘微软雅黑‘, 10), fg=‘green‘)
    ddir.place(x=180, y=50)
    e2.set("dir.txt")

    f=Frame(win)
    l=Listbox(win,height=20,width=100)
    scroll = Scrollbar(f,command=l.yview())
    l.configure(yscrollcommand=scroll.set)
    l.place(x=10,y=100)
    # scroll.place(x=0,y=100)

    Button(win, text="Start", height=2, width=6, font=(‘微软雅黑‘, 10), command=ToClicked).place(x=700, y=20)
    win.mainloop()

def SaveforExcel(id,url,code):
    global excel
    global sheet
    sheet.write(id, 0, id)
    sheet.write(id, 1, url)
    sheet.write(id, 2, code)
    excel.save(‘code.xls‘)

if __name__ == ‘__main__‘:
    GUI()

  

原文地址:https://www.cnblogs.com/chrysanthemum/p/12228585.html

时间: 2024-10-19 02:46:30

python网站目录爬行的相关文章

python 查看目录下所有目录和文件

python查看目录下所有的子目录和子文件 python递归便利目录结构 方法1 import json, os def list_dir(path, res): for i in os.listdir(path): temp_dir = os.path.join(path, i) if os.path.isdir(temp_dir): temp = {"dirname": temp_dir, 'child_dirs': [], 'files': []} res['child_dirs

Python并发目录

Python并发目录 Python网络编程-IO阻塞与非阻塞及多路复用 Python进程-理论 Python进程-实现 Python进程间通信 注意点 python编程中的if __name__ == 'main与windows中使用多进程 综合运用实例 Python Socket请求网站获取数据  未完待续…… 原文地址:https://www.cnblogs.com/xiao-apple36/p/8684874.html

wwwscan网站目录文件批量扫描工具

准备一个比赛样题里面给的一个扫描的工具: 不知道怎么用就上网百度了一下果然有关于这个软件的两篇介绍(感觉写的很好),第一篇介绍的应该和我的工具一样,也给了例子(现在Google不能访问了)和参数介绍,第二篇作者可能自己"升级"过软件也提供了下载地址.但是有个问题是:我机器上跑感觉那些多进程.端口和超时等参数都是虚设的,我试验的结果是我的软件只要输入ip或域名就可以运行扫描. ps:直接copy 文章来源:http://blog.chinaunix.net/uid-26726420-id

Centos解决Apache配置虚拟主机问题。Apache欢迎页可以打开,但是网站目录定位不上

本文用作工作记录,需要用的朋友可以参考下. Centos7安装LAMP环境教程http://www.osyunwei.com/archives/7882.html 安装部署完毕后,需要配置多个虚拟主机用户多个项目部署. vi /etc/httpd/conf/httpd.conf 编辑其中的DocumentRoot 目录地址可以指定自己方便的,在这里我指定的是自己习惯的.不要定义到用户目录(root)里,否则可能访问权限不足. 网站虚拟主目录 /var/WEB/ DocumentRoot "/va

如何修改XAMPP默认网站目录

XAMPP默认网站目录保存在...\xampp\htdocs文件夹下,修改目录步骤: 1.XAMPP面板,点击Apache服务器Config按钮,选择Apache(httpd.conf): 2.在打开的记事本中,使用快捷键Ctrl+F进行查找,输入:DocumentRoot,找到类似下图的东西,修改目录即可.

nginx 设置网站目录访问验证方法【转载】

为网站目录设置访问验证之后我们就是进入此页面都需要输入验证密码才可以,下面我来介绍nginx中配置目录访问验证码方法总结. 1.创建类htpasswd文件 执行:  代码如下 复制代码 wget -c soft.vpser.net/lnmp/ext/htpasswd.sh;bash htpasswd.sh 按提示输入用户名.密码.及认证文件名.脚本会自动生成认证文件.记录下脚本返回的文件路径.如:/usr/local/nginx/conf/vpser.net.auth. 2.为Nginx添加au

Linux下svn提交文件后自动同步更新到网站目录

有时,对于多文件需要上传到服务器的时候将会很麻烦,但是如果使用svn的钩子脚本就容易实现本地提交svn后,自动同步代码文件到远程服务器的网站目录下,而不必手动上传了. 首先,在网站目录下checkout代码,例如我的目录是/data/www/test svn co https://127.0.0.1/test/trunk//data/www/test/ 注意,这是因为有时我会在服务器上直接修改代码,所以用checkout,如果不需要,可以用export,此指令不带.svn版本文件. 迁出代码后,

Linux更改Apache网站目录出错:Document root must be a directory解决

修改 DocumentRoot <Directory "C:/Apache/Apache2/htdocs" 重启apache 报错Document root must be a directory 然后 找原因  确实是加上的目录呢 原来 只需如此 询问大神的解释是 "这是系统开启了SELinux安全策略造成的.把目录或文件设成了 user_home_t 类型,因此 apache 的进程没有权限,无法访问.针对Apache的进程所使用的SELinux target po

CentOS Linux系统下更改Apache默认网站目录

引言:Apache默认的网站目录是在/var/www/html,我们现在要把网站目录更改到/home/wwwroot/web,操作如下 准备工作:创建目录:cd /homemkdir wwwrootcd wwwrootmkdir webtouch index.php 操作步骤:1.vi /etc/httpd/conf/httpd.conf找到 DocumentRoot "/var/www/html" 这一段 #apache的根目录把/var/www/html 这个目录改为/home/w