Created
November 23, 2019 16:05
-
-
Save mnuddindev/4e7d0398cc5f4dead66f37e596c633bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests as r | |
| from bs4 import BeautifulSoup | |
| ip = open("ip.txt", "a+") | |
| url = open("list.txt").read().split('\n') | |
| print("[+] Script Started") | |
| for i in url: | |
| print(" | Getting Site URL from the List") | |
| t = r.get(i) | |
| html_soup = BeautifulSoup(t.text, 'html.parser') | |
| print(" | Getting Source Code From the list\'s Websites") | |
| try: | |
| b = html_soup.find('div', attrs={ | |
| 'id': 'ipv4-data' | |
| }) | |
| a = b.find_all('a') | |
| except AttributeError: | |
| pass | |
| else: | |
| print(" | Getting Ip\'s From the ip Section") | |
| for item in a: | |
| item = item.get_text() | |
| item = item.strip() | |
| ip.write(item+'\n') | |
| print("[-] Script Finished. Check the ip.txt file for Ip\'s") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment