Hack Forums
[Python] Cloudflare resolver - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Cloudflare resolver (/showthread.php?tid=5041085)



Cloudflare resolver - Laku - Oct 31, 2015

Hello HF
Can somebody help me with Cloudflare resolver but scripted in PYTHON.
I am newbie and don't know too much about python scripting.
Im running win xp 32bit sp3


* - Kokomikta152 - Oct 31, 2015

what have you wrote so far? if nothing you got google to start learning or to search for existing sources.

did the cloudflare resolver a really long time ago... share here your progress i will help you out.


* - ๖ۣۜAnubis - Oct 31, 2015

I code one in 2 minutes, test it

Install Dependence
Code
pip install dnspython

Script
Code
import sys
import dns.resolver

if len(sys.argv) >= 1:
   domain = sys.argv[0]
   answers = dns.resolver.query(domain,'A')
   for server in answers:
      print server

I din't code python in last 2 months, so don't bla me for errors in the code :/ Just reply and i will fix...


* - Radical_ed - Nov 2, 2015

correct me if I'm wrong but isn't a cloudfare resolver just basically the last jump of a tracert?


* - Laku - Nov 5, 2015

I made my own priv8 in python and works perfect, thanks for replies :)
I scanned it on virustotal.com website and Neshta.A virus appeared and i think this is because i compiled it with py2exe.
Tested this with cmd by browsing folder with "cd" command and running it from cmd with typing again "CloudFlareRESOLVER.exe"
mega. nz/#!9F5xRQqZ!87N_Ss4IZgk9Zw2tJ-GRGmEPvrVr2VpL64ERAgi3t9M


* - Black‌jack - Nov 5, 2015

(Nov 2, 2015 03:41 AM)Radical_ed Wrote:  correct me if I'm wrong but isn't a cloudfare resolver just basically the last jump of a tracert?

You are wrong. A CloudFlare "resolver" is querying common subdomains like direct, mail, ftp, etc, and seeing if they return an IP that isn't a CloudFlare IP.