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