JamesBops

Untitled

Jan 14th, 2023
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. import requests
  2. import cfscrape
  3. import re
  4. import os,sys,time
  5. from multiprocessing.dummy import Pool
  6. from bs4 import BeautifulSoup
  7. from time import time as timer
  8.  
  9. headers = {
  10. 'Host': 'domains.tntcode.com',
  11. 'sec-ch-ua': '"Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105"',
  12. 'sec-ch-ua-mobile': '?0',
  13. 'sec-ch-ua-platform': "Windows",
  14. 'Sec-Fetch-Dest': 'document',
  15. 'Sec-Fetch-Mode': 'navigate',
  16. 'Sec-Fetch-Site': 'none',
  17. 'Sec-Fetch-User': '?1',
  18. 'Upgrade-Insecure-Requests': '1',
  19. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36'
  20. }
  21.  
  22. def checking(don):
  23. scraper = cfscrape.create_scraper()
  24. done = don.rstrip()
  25.  
  26. try:
  27.  
  28. ten = scraper.get("https://domains.tntcode.com/ip/"+don)
  29. time.sleep(4)
  30. tenx = ten.content
  31.  
  32.  
  33. regs = re.findall('<a style=\"text-decoration:none;\" href=\"(.*)\" rel=\"nofollow\" target=\"_blank\">', tenx)
  34. jum = len(regs)
  35. #print(jum)
  36. print("[!] "+str(done)+" IP | "+str(jum)+" Domain")
  37. for regs in regs:
  38.  
  39. with open('resultweb.txt', 'a') as o:
  40. o.writelines(regs + '\n')
  41. #
  42. #
  43. except:
  44. pass
  45.  
  46. def Main():
  47. try:
  48. print("\n\t | Reverse IP by SetraJowo | ")
  49. print("\n\t\t Gitlab : https://gitlab.com/setrajowo")
  50. ip = raw_input("\n\nInput List IP \t: ")
  51. thread = raw_input("Threads (Input 1) \t: ")
  52. print("\n\n")
  53. ips = open(ip, 'r').read().splitlines()
  54. pool = Pool(int(thread))
  55. results = pool.map(checking, ips)
  56. except:
  57. pass
  58.  
  59. if __name__ == '__main__':
  60. Main()
Advertisement
Add Comment
Please, Sign In to add comment