Script para captura do IP real + CloudFlare Bypass

Post Reply
Dwirn1337
Membro
Posts: 2
Joined: Mon Nov 26, 2018 12:22 am
x 1
x 2

Script para captura do IP real + CloudFlare Bypass

Post by Dwirn1337 » Mon Nov 26, 2018 1:06 am

Se você está tendo problemas em fazer scan porque o site tem cloudflare, você pode fazer o Bypass ou mesmo estudar o código e aplicar na sua "ferramenta"
Desenvolvido em Python 3.x

Code: Select all

#!/usr/bin/env python
# Coded By: Dwirn1337

from sys import argv
from os import system
from socket import gethostbyname

try:
   import requests
except:
   system("pip install --upgrade pip")
   system("pip install requests")
   import requests

def main(url):
   URL = 'http://www.crimeflare.org/cgi-bin/cfsearch.cgi'
   requests.get(URL)
   payload = {'cfS':url}
   SERVER_RESP = (requests.post(URL, data=payload).text)

   if url.startswith("http://") == True:
      url = url[7:]
   if url.startswith("https://") == True:
      url = url[8:]
   ip = gethostbyname(url)

   if "these are not CloudFlare-user nameservers" in SERVER_RESP:
      print ("\033[1;32m[!] IP encontrado: \033[1;37m{}\033[0m".format(ip))
   else:
      arq = open('res_cf.txt','w')
      arq.write(SERVER_RESP)
      arq.close()
      arq = open('res_cf.txt','r')
      linhas = arq.readlines()

      for res in linhas:
         if res.startswith('<LI>'):
            SS = res.split(" ")
            print ("\033[1;32m[!] Real IP encontrado: \033[1;37m{}\033[0m".format(SS[2]))
            print ("\033[1;32m[!] CloudFlare IP: \033[1;37m{}\033[0m".format(ip))
            break

if __name__ == '__main__':
   try:
      url1 = argv[1]
   except:
      print ("[+] Use: {} <url>".format(argv[0]))
      exit(0)

   if url1.startswith("http://") == False and url1.startswith("https://") == False:
      url1 = "https://{}".format(url1)

   main(url1)
Att: Dwirn1337
2 x

Post Reply