Code Monkey home page Code Monkey logo

punter's Introduction

Punter

Punter (passive hunter) helps with the first step in footprinting a domain. The idea is not to touch the target domain but passively find a good initial amount of information and put it into an easy to view report. It uses:

  • DNS Dumpster
  • Whois
  • Reverse whois on email
  • Haveibeenpwned lookup on emails found
  • CRT.sh to find subdomains
  • Crimeflare to uncover true IP's behind Cloudflare

Whois and DNS lookups are still done on the host, not through an API, so if you are worried about that take precautions. Otherwise, all other lookups are down using other services.

After the scan an HTML report is generated with results, just double click and open it.

Setup

git clone https://github.com/nethunteros/punter
cd punter
pip install -r requirements.txt

Setup - Arch Linux

su
git clone https://github.com/nethunteros/punter
cd punter
pip2 install -r requirements.txt
pip2 install ipaddr

python2 main.py -t google.com

Run

If you want to enable Shodan when searching then you need to edit config.cfg. Change enable to True then add your API key.

Change the target to domain you are interested in:

python main.py -t google.com

Credits

  • Everyone who built apis/websites this script scrapes form
  • @jmingov for html fixes/putting up with my terrible scripts

TODO:

  • Grab html of site/headers using another service
  • Net range from Whois
  • Better unicode fixes
  • Try/except for all types of errors

Test

This software is mainly tested under Kali Linux, we recommend use this distribution.

  • Kali Linux, Python 2.7.13 - OK
  • Arch Linux, Python 2.7.13 - OK Currently Punter is not supported under

punter's People

Contributors

binkybear avatar nethunteros avatar nextco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

punter's Issues

utf-8 ecoding issues

html.write(u'<p><p><span>WHOIS Info:</span><p><pre> {} </pre>'.format(whois_text.encode('utf-8')))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 5863: ordinal not in range(128)

Solved by adding the following lines:

# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')

Missing BeautifulSoup

As described. Fixed by pip install bs4. Corrected entry needed in requirements.txt (replace BS with bs4).

ModuleNotFoundError: No module named 'ConfigParser'

Hi, i cant run this it says

python3 main.py -t google.com
/home/root/punter/main.py:625: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if shodan_result is not "No information":
Traceback (most recent call last):
File "/home/root/punter/main.py", line 2, in
import ConfigParser as configparser
ModuleNotFoundError: No module named 'ConfigParser

DNS or Subdomain Erro

Traceback (most recent call last):
File "main.py", line 11, in
import subdomains
File "/root/Downloads/punter/subdomains.py", line 1, in
from dnsdumpster import DNSDumpsterAPI
File "/usr/local/lib/python2.7/dist-packages/dnsdumpster/DNSDumpsterAPI.py", line 82
file=sys.stderr,
^
SyntaxError: invalid syntax


whats the issue here ? someone can point me in right direction ?

Speed [enhancement]

Check out spyse.com. I think it could help to increase the speed and resolve some problems, it's a bit easier to set up

Crimeflare DB Port Changed

Currently the script is broken because of a 404 to the crimeflare db. This can be fixed by simply updating the port number to the appropriate one on line 16 as below:

14     try:
 15         # From http://www.crimeflare.us/zippy.html
 16         url = 'http://crimeflare.net:83/domains/ipout.zip'
 17         file_name = url.split('/')[-1]
 18         u = urllib2.urlopen(url)
 19         f = open(file_name, 'wb')
 20         meta = u.info()
 21         file_size = int(meta.getheaders("Content-Length")[0])
 22         print "[+] Downloading: %s Bytes: %s" % (file_name, file_size)

problem with whois_dict.name_servers

[+] Name servers found in WHOIS data:
Traceback (most recent call last):
File "main.py", line 591, in
main(target)
File "main.py", line 167, in main
for ns in whois_dict.name_servers:
TypeError: 'NoneType' object is not iterable

I am getting this error message, any ideas?

UnicodeEncodeError:

i have problem always i search subdomains

Traceback (most recent call last):
  File "main.py", line 597, in <module>
    main(target)
  File "main.py", line 391, in main
    html.write('<p><p><span>WHOIS Info:</span><p><pre>' + whois_text + '</pre>')
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 244: ordinal not in range(128)

No lxml

As per errorlog:
Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

To be fixed by adding lxml to your requirements.txt. After installed lxml - works fine.

missing module

python main.py -t baidu.com

Traceback (most recent call last):
File "main.py", line 11, in
import subdomains
File "/Users/kevinxu/Code/python/punter/subdomains.py", line 1, in
from dnsdumpster import DNSDumpsterAPI
ImportError: No module named dnsdumpster

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.