CRAWING SPIDER
ゴール - >再帰的にベースURLから始まるすべてのリンクを一覧表示します。
1.読むページのHTML。
2.すべてのリンクを抽出します。
リストにまだない新規の各リンク3.を繰り返します。
#!は/ usr / binに/ envをpythonの インポート再 インポート要求 から urllib.parse 輸入urljoin target_url = " http://10.0.0.45/mutillidae/ " target_links = [] DEF (URL)をextract_links_from: 応答 = requests.get(URLを) 戻り re.findall(' (?:HREF = ")(*。?")' 、response.content.decode()) デフ:クロール(URL) href_links = extract_links_from(URL) のためのリンクでhref_links: リンク = urljoin(URL、リンク) であれば 、 " #" でリンク: リンク = link.split(" #" )[0] の場合 target_url でリンクとリンクない でtarget_links: target_links.append(リンク) プリント(リンク) クロール(リンク) クロール(target_url)
Pythonプログラムは完全に実行されます。
http://10.0.0.45/mutillidae/favicon.ico」 http://10.0.0.45/mutillidae/styles/global-styles.css " のhttp: //10.0.0.45/mutillidae/styles/ddsmoothmenu/ddsmoothmenu.css" http://10.0.0.45/mutillidae/styles/ddsmoothmenu/ddsmoothmenu-v.css " のhttp: //10.0.0.45/mutillidae/index.php?page=home.php" http://10.0.0.45/mutillidae/ ?index.phpのページ= login.php " のhttp: //10.0.0.45/mutillidae/index.php?DO =トグルヒント&ページ= login.php " http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=login.php " のhttp: //10.0.0.45/mutillidae/ 設定 -up-データベース。 PHP」 http://10.0.0.45/mutillidae/index.php?page=show-log.php " のhttp: //10.0.0.45/mutillidae/index.php?DO =トグルヒント&ページ=ショーlog.php" のhttp: //10.0.0.45/mutillidae/index.php?do=toggle-security&page=show-log.php " のhttp: //10.0.0.45/mutillidae/index.php?page=captured-data.php" のhttp:// 10.0.0.45/mutillidae/index.php?do=toggle-hints&page=captured-data.php " のhttp:?//10.0.0.45/mutillidae/index.php DO =トグルセキュリティ&ページ=撮影し-data.php" のhttp: //10.0.0.45/mutillidae/index.php?page=credits.php " のhttp:?//10.0.0.45/mutillidae/index.php DO =トグルヒント&ページ=クレジット。PHP」 http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=credits.php " のhttp: //10.0.0.45/mutillidae/" http://10.0.0.45/mutillidae/index.php?page =ユーザーinfo.php " のhttp:?//10.0.0.45/mutillidae/index.php DO =トグルヒント&ページ=ユーザーinfo.php" http://10.0.0.45/mutillidae/index.php?do=toggle -security&ページ=ユーザーinfo.php " のhttp: //10.0.0.45/mutillidae/index.php?page=register.php" http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=register .PHP " のhttp:?//10.0.0.45/mutillidae/index.php DO =トグルセキュリティ&ページ= register.php" http://10.0.0.45/mutillidae/index。PHP?ページ=ビュー誰か-blog.php" HTTP:?//10.0.0.45/mutillidae/index.php DO =トグルヒント&ページ= ビュー -someones-blog.php" http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=view -someones-blog.php " のhttp: //10.0.0.45/mutillidae/index.php?page=add-to-your-blog.php" http://10.0.0.45/mutillidae/index.php?do=toggle -hints&ページ=アドオンに-あなた-blog.php " のhttp:?//10.0.0.45/mutillidae/index.php DO =トグルセキュリティ&ページ=アドオンに-あなた-blog.php" http://10.0.0.45 /mutillidae/index.php?page=site-footer-xss-discussion.php " のhttp: //10.0.0.45/mutillidae/index.php?やります=&ページ=サイトのフッター-XSS-discussion.php-ヒントを切り替える" http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=site-footer-xss-discussion.php " のhttp: //10.0 ?.0.45 / mutillidae / index.phpのページ= HTML5-storage.php " http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=html5-storage.php " のhttp: //10.0.0.45 /mutillidae/index.php?DO =トグルセキュリティ&ページ= HTML5-storage.php " http://10.0.0.45/mutillidae/index.php?page=capture-data.php " のhttp: //10.0.0.45/mutillidae/index.php?DO =トグルヒント&ページ=キャプチャ-data.php」 http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=capture-data。//10.0.0.45/mutillidae/index.php?page=dns-lookup.php " http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=dns-lookup.php " のhttp: // 10.0.0.45/mutillidae/index.php?DO =トグルセキュリティ&ページ= DNS-lookup.php」 http://10.0.0.45/mutillidae/index.php " のhttp: //10.0.0.45/mutillidae/index.php?page=password-generator.php&username=anonymous" http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=password-generator.php " のhttp: //10.0.0.45/mutillidae/index.php?DO =トグルセキュリティ&ページ=パスワード-generator.php " http://10.0.0.45/mutillidae/index.php?page=user-poll.php " のhttp://10.0.0.45/mutillidae/index.php?DO =トグルヒント&ページ=ユーザーpoll.php " http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=user-poll.php " のhttp: //10.0.0.45/mutillidae/index。 ?phpのページ= 設定 -background-color.php " http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=set-background-color.php " のhttp: //10.0.0.45/mutillidae/ index.phpを?DO =トグルセキュリティ&ページ= 設定 -background-color.php " http://10.0.0.45/mutillidae/index.php?page=pen-test-tool-lookup.php " のhttp: //10.0.0.45/mutillidae/ index.phpを?DO =トグルヒント&ページ=ペン・テスト・ツールlookup.php」 http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=pen-test-tool-lookup.php " のhttp: //10.0.0.45/mutillidae/index.php?page=text-file- viewer.php " http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=text-file-viewer.php " のhttp:?//10.0.0.45/mutillidae/index.php DO = toggle-セキュリティ&ページ=テキストファイルviewer.php " http://10.0.0.45/mutillidae/index.php?page=browser-info.php " のhttp:?//10.0.0.45/mutillidae/index.php DO = toggle-ヒント&ページ=ブラウザ-info.php " http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=browser-info.php " のhttp: //10.0.0.45/mutillidae/index。PHP?ページ=ソース-viewer.php」 http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=source-viewer.php " のhttp:?//10.0.0.45/mutillidae/index.php DO =トグルセキュリティ&ページ=ソースビューア。 PHP " http://10.0.0.45/mutillidae/index.php?page=arbitrary-file-inclusion.php " のhttp:?//10.0.0.45/mutillidae/index.php DO =トグルヒント&ページ=任意ファイル- inclusion.php " http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=arbitrary-file-inclusion.php " のhttp: //10.0.0.45/mutillidae/index.php?page=secret-行政-pages.php " http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=secret-administrative-pages.php " のhttp://10.0.0.45/mutillidae/index.php?DO =トグルセキュリティ&ページ=秘密管理-pages.php " http://10.0.0.45/mutillidae/index.php?page=framing.php " のhttp: //10.0.0.45/mutillidae/index.php?DO =トグルヒント&ページ= framing.php」 http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=framing.php " のhttp: //10.0.0.45/mutillidae/framer.html" のhttp: //10.0.0.45/mutillidae/index.php?page=change-log.htm " のhttp: //10.0.0.45/mutillidae/index.php?DO =トグルヒント&ページ=変更-log.htm " http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=change-log.htm "//10.0.0.45/mutillidae/index.php?page=installation.php " http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=installation.php " のhttp: //10.0.0.45/ mutillidae / index.phpを?DO =トグルセキュリティ&ページ= installation.php " http://10.0.0.45/mutillidae/documentation/mutillidae-installation-on-xampp-win7.pdf " のhttp: //10.0.0.45/mutillidae/index.php?page=ドキュメント/ vulnerabilities.php " http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=documentation/vulnerabilities.php " のhttp: //10.0.0.45/mutillidae/index.php?DO =トグルセキュリティ&ページ=ドキュメント/ vulnerabilities.php」 http://10.0.0.45/mutillidae/index.php?page=documentation/how-to-access-Mutillidae-over-Virtual-Box-network.php " のhttp: //10.0.0.45/mutillidae/index.php?DO =トグルヒント&ページ=ドキュメンテーション/どのようにアクセスできる-Mutillidaeオーバーバーチャル・ボックス・network.php」 http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=documentation/how-アクセス- Mutillidaeオーバーバーチャル・ボックス・network.php「 のhttp:?//10.0.0.45/mutillidae/index.php DO =トグルヒント&ページ= home.php」 http://10.0.0.45/mutillidae/ index.phpのDO =トグルセキュリティ&ページ= home.php? " のhttp: //10.0.0.45/mutillidae/ のhttp: //10.0.0.45/mutillidae/?page=add-to-your-blog.php" http://10.0.0.45/mutillidae/?page=view-someones-blog.php " のhttp: //10.0.0.45/mutillidae/?page=show-log.php" http://10.0.0.45/mutillidae/ ?ページ=テキストファイルviewer.php " のhttp: //10.0.0.45/mutillidae/?page=user-info.php" http://10.0.0.45/mutillidae/?page=login.php " のhttp: / /10.0.0.45/mutillidae/?page=credits.php " http://10.0.0.45/mutillidae/?page=source-viewer.php " のhttp: //10.0.0.45/mutillidae/index.php?page=usage -instructions.php " http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=usage-instructions.php " のhttp: //10.0.0.45/mutillidae/index.php?やります=&ページ=利用instructions.php "セキュリティ切り替える http://10.0.0.45/mutillidae/index.php?page=php-errors.php " にhttp: //10.0.0.45/mutillidae/index.php?DO =トグルヒント&ページ= PHP-errors.php " http://10.0.0.45/mutillidae/index.php?do=toggle-security&page=php-errors.php " のhttp: //10.0.0.45/mutillidae/index。 ?phpのページ= notes.php " http://10.0.0.45/mutillidae/index.php?do=toggle-hints&page=notes.php " のhttp: //10.0.0.45/mutillidae/index.php?DO =トグルセキュリティ&ページ= notes.php」