Sinisterly
Python - Website Recon Tool - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Hacking (https://sinister.ly/Forum-Hacking)
+--- Forum: Hacking Tools (https://sinister.ly/Forum-Hacking-Tools)
+--- Thread: Python - Website Recon Tool (/Thread-Python-Website-Recon-Tool)

Pages: 1 2 3


Python - Website Recon Tool - Eclipse - 09-28-2014

[Image: res0pij.png]
Python - Website Recon Tool

[Image: 21c4b71dfa679517a0f02deae888dc81.png]
WebsiteRecon.py

Code:

Code:
import socket import dns.resolver import urllib.request #Coded for SL by Eclipse print() print("==================================================") print("--------------------------------------------------") print("==================================================") print() print() print(" =-=-=-=-=-Website Recon-=-=-=-=-= ") print() print() print("==================================================") print("--------------------------------------------------") print("==================================================") def main(): print() url = input("Enter the website URL (Don't include 'http://')~: ") http = 'http://' http_url = str(http + url) print() print("Analyzing", http_url) print() try: hostname = socket.gethostbyname(url) nameserver = dns.resolver.query(url,'NS') print("[+]Server IP: ", hostname) for server in nameserver: print("[+]Nameserver: ", server) print("[+]Grabbing banner...") banner_grab = urllib.request.urlopen(http_url).info() print("----------") print(banner_grab) print("----------") except: print("[+]Unknown Error!") main() main() main()

Github: https://github.com/Eclipse-kun/eclipse/blob/master/WebsiteRecon.py


RE: Python - Website Recon Tool - Kizaru - 09-28-2014

What are all these empty prints for?
Code:
print() print() print(" =-=-=-=-=-Website Recon-=-=-=-=-= ") print() print()



RE: Python - Website Recon Tool - Shebang - 09-28-2014

(09-28-2014, 09:17 PM)Yagmi Wrote: What are all these empty prints for?
Code:
print() print() print(" =-=-=-=-=-Website Recon-=-=-=-=-= ") print() print()

I mean, they're clearly for spacing the text, but @Eclipse, you should really just do this:
Code:
print("\n\n =-=-=-=-=-Website Recon-=-=-=-=-= \n\n")
Use escape sequences!


RE: Python - Website Recon Tool - Adorapuff - 09-28-2014

You should check if http is included in the string instead of telling people how they should input the string. Otherwise good job.


RE: Python - Website Recon Tool - Dyme - 09-28-2014

(09-28-2014, 09:31 PM).Shebang Wrote: I mean, they're clearly for spacing the text, but @Eclipse, you should really just do this:
Code:
print("\n\n =-=-=-=-=-Website Recon-=-=-=-=-= \n\n")
Use escape sequences!

ooor because python is soo gangster at making your life easier:

[Image: 61HL4CS.png]

EDIT:
(09-28-2014, 08:33 PM)Eclipse Wrote:
Code:
print() url = input("Enter the website URL (Don't include 'http://')~: ") http = 'http://' http_url = str(http + url)

lol what happened to raw_input()?


RE: Python - Website Recon Tool - Shebang - 09-28-2014

(09-28-2014, 09:50 PM)Dyme Wrote: ooor because python is soo gangster at making your life easier:

[Image: 61HL4CS.png]

EDIT:

lol what happened to raw_input()?

Presumably he's using Python 3.x+. raw_input() became input().
Before that, input() worked like how eval(input()) works in Python 3.x.


RE: Python - Website Recon Tool - Dyme - 09-28-2014

(09-28-2014, 10:06 PM).Shebang Wrote: Presumably he's using Python 3.x+. raw_input() became input().
Before that, input() worked like how eval(input()) works in Python 3.x.

Oi, then forget everything I posted. Didn't know people actually used python 3 lol...


RE: Python - Website Recon Tool - Shebang - 09-28-2014

(09-28-2014, 10:14 PM)Dyme Wrote: Oi, then forget everything I posted. Didn't know people actually used python 3 lol...

I was forced to for school. Kinda sucked, a lot of stuff isn't compatible.


RE: Python - Website Recon Tool - Reiko - 09-29-2014

What is the difference with your tool and using curl??


RE: Python - Website Recon Tool - Eclipse - 09-29-2014

(09-28-2014, 09:44 PM)Adorapuff Wrote: You should check if http is included in the string instead of telling people how they should input the string. Otherwise good job.

I'm lazy, but I'll add that.

(09-28-2014, 09:50 PM)Dyme Wrote: lol what happened to raw_input()?

That's Python2, this is Py3.

(09-29-2014, 04:30 AM)Reiko Wrote: What is the difference with your tool and using curl??

Nothing much really, it just simplifies it into one Py script.