gfek / Lepus

Subdomain finder
BSD 3-Clause "New" or "Revised" License
359 stars 45 forks source link

Error in colored module #1

Closed nsonaniya2010 closed 6 years ago

nsonaniya2010 commented 6 years ago

File "lepus.py", line 24 print colored("\n[*]-Retrieving DNS Records...",'yellow') ^ SyntaxError: invalid syntax

gfek commented 6 years ago

Hi,

did you try git clone? It works fine.

thanks

nsonaniya2010 commented 6 years ago

Yes done git clone but showing that error, fixing it by print ( xxxx ) instead of print xxxx. But there are some more errors like in some places like arguments problem.

gfek commented 6 years ago

What python do you use? The Lepus has been developed in python2.7, in a case that you have python3, maybe there are some errors. Be free to contribute in a case that you have python3.

nsonaniya2010 commented 6 years ago

I got it, python 2.7 worked for me. But getting error when getting subdomains through shodan:

[*]-Searching Shodan...
  \__ Unique subdomains found:
Traceback (most recent call last):
  File "lepus.py", line 431, in <module>
    shodan_list=subShodan(args.search)
  File "lepus.py", line 134, in subShodan
    print "  \__", colored("Unique subdomains found:",'cyan'), colored(len(set(hosts)),'yellow')
  File "/usr/bin/lib/python2.7/site-packages/termcolor.py", line 110, in colored
    text = re.sub(COLORS_RE + '(.*?)' + RESET_RE, r'\1', text)
  File "/usr/bin/lib/python2.7/re.py", line 155, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or buffer

let me know

gfek commented 6 years ago

Can you pls post the domain that you used in order to replicate the above error and try to fix it with try/except?

nsonaniya2010 commented 6 years ago

same error for all domains.

gfek commented 6 years ago

This is very weird, as i am not facing this kind of issue (I checked it). Please send some domains as I cannot replicate the issue.

nsonaniya2010 commented 6 years ago

shodan is doing the problem, all other methods working fine.

gfek commented 6 years ago

I understood that, but pls send me a domain to check it.

nsonaniya2010 commented 6 years ago

jotform.com check this

gfek commented 6 years ago

I checked it, however no error, shodan is working fine for me (with key/without key)

[*]-Checking if domain jotform.com is wildcard... __ Not a wildcard domain.

[*]-Retrieving DNS Records... _ A : 104.23.132.6,104.23.128.7 _ NS : jay.ns.cloudflare.com,leah.ns.cloudflare.com _ TXT : "v=spf1 include:spf1.jotform.com include:spf2.jotform.com -all","google-site-verification=dzI_jhaY6WEaI_W4_ibtid7sgDCf9xbKxJtNCx-VBwY","blitz=mu-f7d86c61-76376714-55e3b491-cf0e7819"

[]-Searching Shodan... __ Unique subdomains found: 2 []-Searching DNSDumpster... _ Unique subdomains found: 2 [*]-Searching ThreatCrowd... _ Unique subdomains found: 53 []-Searching VirusTotal... []-Searching crt.sh Certificates... _ Unique subdomains found: 27 [*]-Searching FindSubDomain... _ Unique subdomains found: 78 []-Searching DNSTrails... __ Unique subdomains found: 16 []-Searching Cencys Certificates... [*]-Searching DNSDB.COM... __ Unique subdomains found: 37

nsonaniya2010 commented 6 years ago

Not for me, i think some modules packages in python are not properly installed. I will check that out and will back to you.

Thanks

nsonaniya2010 commented 6 years ago

All others are working without giving any error but not finding any subdomain

[*]-Searching DNSDumpster...
[*]-Searching ThreatCrowd...
  \__ Unique subdomains found: [*]-Searching VirusTotal...
[*]-Searching crt.sh Certificates...
  \__ Unique subdomains found: [*]-Searching FindSubDomain...
  \__ Unique subdomains found: [*]-Searching DNSTrails...
  \__ Unique subdomains found: [*]-Searching Cencys Certificates...
[*]-Searching DNSDB.COM...
  \__ Unique subdomains found: 
nsonaniya2010 commented 6 years ago

can you send me you lepus.py file? Thanks

gfek commented 6 years ago

It is the same file.

Follow the steps below and inform me about the output of the Lepus:

  1. virtualenv venv
  2. cd venv
  3. source venv/bin/activate
  4. git clone https://github.com/gfek/Lepus.git
  5. pip install -r requirements.txt
  6. python lepus.py -s jotform.com