0% found this document useful (0 votes)
6 views2 pages

Script

The document is a Python script that automates network reconnaissance tasks using subprocess commands. It gathers DNS information, performs WHOIS lookups for domains, and conducts various Nmap scans including SYN stealth, fragmentation, decoy, and source port manipulation. The user is prompted to enter a target domain or IP address to initiate the automation process.

Uploaded by

nawaz.ahsan.work
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Script

The document is a Python script that automates network reconnaissance tasks using subprocess commands. It gathers DNS information, performs WHOIS lookups for domains, and conducts various Nmap scans including SYN stealth, fragmentation, decoy, and source port manipulation. The user is prompted to enter a target domain or IP address to initiate the automation process.

Uploaded by

nawaz.ahsan.work
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

import subprocess

import os

def run_step(title, cmd):

print(f"\n{'='*20} {title} {'='*20}")

try:

# Commands ko execute karna aur output print karna

process = [Link](cmd, shell=True, stdout=[Link], stderr=[Link])

for line in iter([Link], b''):

print([Link]().strip())

except Exception as e:

print(f"[!] Error running {title}: {str(e)}")

# User Input

target = input("Bhai, Target Domain ya IP enter karein (e.g., [Link]): ")

print(f"\n[+] Starting Automation on: {target}")

# --- SECTION 1: INFORMATION GATHERING (Fast) ---

# NSLookup: DNS records check karne ke liye

run_step("DNS Information", f"nslookup {target}")

# Whois: Domain ki registration details (Sirf domains ke liye kaam karega)

if not [Link]('.', '').isdigit():

run_step("Whois Lookup", f"whois {target}")

# --- SECTION 2: ADVANCED STEALTH SCANNING (Nmap) ---

# Task 1: SYN Stealth Scan (Half-Open)

run_step("SYN Stealth Scan", f"sudo nmap -sS -Pn -F {target}")


# Task 2: Fragmentation (MTU 16) - Firewall Evasion

run_step("Fragmentation Scan (MTU 16)", f"sudo nmap -sS -Pn --mtu 16 -F {target}")

# Task 3: Decoy Scan (Random 10 IPs)

run_step("Decoy Scan (10 Random IPs)", f"sudo nmap -sS -Pn -D RND:10 -F {target}")

# Task 4: Source Port Manipulation (DNS Port 53)

run_step("Source Port 53 Manipulation", f"sudo nmap -sS -Pn -g 53 -F {target}")

print("\n[#] Sab kaam ho gaya! Results upar check kar lein.")

You might also like