Skip to content

Commit 59082f1

Browse files
Merge pull request #7 from thevillagehacker/dev
PR new #not sure
2 parents 099d7d9 + f986560 commit 59082f1

3 files changed

Lines changed: 21 additions & 378 deletions

File tree

bug_bounty/scan.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ fi
9090

9191
# Prompt for target if not provided as argument
9292
if [ -z "$1" ]; then
93-
echo -e "${YELLOW}[*]${NC} No target ID provided"
93+
echo -e "${YELLOW}[-]${NC} No target ID provided"
9494
read -p "Enter target name: " id
9595
if [ -z "$id" ]; then
9696
error "Target name cannot be empty"
@@ -173,7 +173,10 @@ log "DNS Resolution: Resolving subdomains with puredns..."
173173
puredns resolve "$scan_path/subs.txt" -r "$lists_path/resolvers.txt" --resolvers-trusted "$lists_path/resolvers-trusted.txt" -w "$scan_path/resolved.txt" | wc -l
174174

175175
log "DNS Resolution: Extracting IP addresses with dnsx..."
176-
dnsx -l "$scan_path/resolved.txt" -json -o "$scan_path/dns.json" && jq -r '.. | objects | to_entries[] | select(.value | tostring | test("^\\d+\\.\\d+\\.\\d+\\.\\d+$")) | .value' "$scan_path/dns.json" | anew "$scan_path/ips.txt" | wc -l
176+
dnsx -l "$scan_path/resolved.txt" -json -o "$scan_path/dns.json"
177+
log "Extracting IP addresses from $scan_path/dns.json"
178+
# Use grep to extract IPv4 addresses from the JSON output (robust across different dnsx JSON shapes)
179+
grep -oE '\b([0-9]{1,3}\\.){3}[0-9]{1,3}\b' "$scan_path/dns.json" | anew "$scan_path/ips.txt" | wc -l
177180

178181
# Port Scanning & HTTP Server Discovery
179182
log "Port Scanning: Running nmap on discovered IPs..."

bug_bounty/scripts/request.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import requests
2+
3+
requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning)
4+
5+
def format_text(title, item):
6+
cr='\r\n'
7+
section_break = cr + "-" * 20 + cr
8+
item=str(item)
9+
text = title + section_break + item + section_break
10+
return text
11+
r = requests.get('https://thevillagehacker.com', verify=False)
12+
print(format_text('r.status_code is: ',r.status_code))
13+
print(format_text('r.text is: ',r.text))
14+
print(format_text('r.headers is: ',r.headers))
15+
print(format_text('r.cookies is: ',r.cookies))
16+
print(format_text('r.url is: ',r.url))

0 commit comments

Comments
 (0)