bhp-pro 1.2.3__py3-none-any.whl → 1.2.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bhp_pro-1.2.3.dist-info → bhp_pro-1.2.4.dist-info}/METADATA +1 -1
- bhp_pro-1.2.4.dist-info/RECORD +6 -0
- bhp_pro.py +21 -28
- bhp_pro-1.2.3.dist-info/RECORD +0 -6
- {bhp_pro-1.2.3.dist-info → bhp_pro-1.2.4.dist-info}/WHEEL +0 -0
- {bhp_pro-1.2.3.dist-info → bhp_pro-1.2.4.dist-info}/entry_points.txt +0 -0
- {bhp_pro-1.2.3.dist-info → bhp_pro-1.2.4.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
bhp_pro.py,sha256=bgNV9jbwdNV3wtANUXO-5YDi7Qrv16LLO3LtWGumIOE,743939
|
|
2
|
+
bhp_pro-1.2.4.dist-info/METADATA,sha256=BznlzIpE7ds538WC90jCgjEsZiS58cbKVy72SrXxFGU,600
|
|
3
|
+
bhp_pro-1.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
+
bhp_pro-1.2.4.dist-info/entry_points.txt,sha256=Yn3HpraGX3lXX4FPq3Gm-lHh3SwQA-5rtgPWNWMFXkw,41
|
|
5
|
+
bhp_pro-1.2.4.dist-info/top_level.txt,sha256=1xjbIaVM77UJz9Tsi1JjILgE0YDG7iLhY6KSMNEi9zM,8
|
|
6
|
+
bhp_pro-1.2.4.dist-info/RECORD,,
|
bhp_pro.py
CHANGED
|
@@ -7854,17 +7854,12 @@ def udp_tcp():
|
|
|
7854
7854
|
try:
|
|
7855
7855
|
sock.sendto(payload, (ip, port))
|
|
7856
7856
|
data, _ = sock.recvfrom(1024)
|
|
7857
|
-
# Got actual UDP response (port is open)
|
|
7858
7857
|
return 'open', data
|
|
7859
7858
|
except socket.timeout:
|
|
7860
|
-
# No response (port might be open/filtered)
|
|
7861
|
-
# UDP scanning limitation: can't distinguish open vs filtered
|
|
7862
7859
|
return 'timeout', None
|
|
7863
7860
|
except ConnectionResetError:
|
|
7864
|
-
# ICMP port unreachable (port is closed)
|
|
7865
7861
|
return 'closed', None
|
|
7866
7862
|
except Exception as e:
|
|
7867
|
-
# Other error
|
|
7868
7863
|
return 'error', None
|
|
7869
7864
|
|
|
7870
7865
|
def service_detection(ip, port, protocol='tcp'):
|
|
@@ -7941,7 +7936,7 @@ def udp_tcp():
|
|
|
7941
7936
|
return category
|
|
7942
7937
|
return "Other"
|
|
7943
7938
|
|
|
7944
|
-
def fast_tcp_scan(ip, ports, stats,
|
|
7939
|
+
def fast_tcp_scan(ip, ports, stats, results_store):
|
|
7945
7940
|
found_ports = []
|
|
7946
7941
|
|
|
7947
7942
|
def check_port(ip, port):
|
|
@@ -7967,13 +7962,10 @@ def udp_tcp():
|
|
|
7967
7962
|
found_ports.append((port, service, category))
|
|
7968
7963
|
|
|
7969
7964
|
results_store['tcp'].append(f"{ip}:{port} ({category}) - {service}")
|
|
7970
|
-
|
|
7971
|
-
if pbar:
|
|
7972
|
-
pbar.set_description(f"TCP: {stats['tcp']} UDP: {stats['udp']}")
|
|
7973
7965
|
|
|
7974
7966
|
return found_ports
|
|
7975
7967
|
|
|
7976
|
-
def fast_udp_scan(ip, ports, stats,
|
|
7968
|
+
def fast_udp_scan(ip, ports, stats, results_store):
|
|
7977
7969
|
found_ports = []
|
|
7978
7970
|
|
|
7979
7971
|
def check_udp_port(ip, port):
|
|
@@ -7983,14 +7975,15 @@ def udp_tcp():
|
|
|
7983
7975
|
payload = common_ports_payloads.get(port, b'')
|
|
7984
7976
|
status, data = send_udp_packet(ip, port, payload)
|
|
7985
7977
|
|
|
7986
|
-
# Only count as open if we got actual UDP response
|
|
7987
7978
|
if status == 'open':
|
|
7988
7979
|
service = service_detection(ip, port, 'udp')
|
|
7989
7980
|
return port, service
|
|
7990
7981
|
return None, None
|
|
7991
7982
|
|
|
7983
|
+
udp_ports_to_scan = [port for port in ports if port in common_ports_payloads]
|
|
7984
|
+
|
|
7992
7985
|
with ThreadPoolExecutor(max_workers=MAX_THREADS) as executor:
|
|
7993
|
-
futures = [executor.submit(check_udp_port, ip, port) for port in
|
|
7986
|
+
futures = [executor.submit(check_udp_port, ip, port) for port in udp_ports_to_scan]
|
|
7994
7987
|
for future in as_completed(futures):
|
|
7995
7988
|
port, service = future.result()
|
|
7996
7989
|
if port:
|
|
@@ -8000,18 +7993,12 @@ def udp_tcp():
|
|
|
8000
7993
|
found_ports.append((port, service, category))
|
|
8001
7994
|
|
|
8002
7995
|
results_store['udp'].append(f"{ip}:{port} ({category}) - {service}")
|
|
8003
|
-
|
|
8004
|
-
if pbar:
|
|
8005
|
-
pbar.set_description(f"TCP: {stats['tcp']} UDP: {stats['udp']}")
|
|
8006
7996
|
|
|
8007
7997
|
return found_ports
|
|
8008
7998
|
|
|
8009
|
-
def scan_target(ip, stats,
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
tcp_ports = fast_tcp_scan(ip, COMMON_PORTS, stats, pbar, results_store)
|
|
8014
|
-
udp_ports = fast_udp_scan(ip, COMMON_PORTS, stats, pbar, results_store)
|
|
7999
|
+
def scan_target(ip, stats, results_store):
|
|
8000
|
+
tcp_ports = fast_tcp_scan(ip, COMMON_PORTS, stats, results_store)
|
|
8001
|
+
udp_ports = fast_udp_scan(ip, COMMON_PORTS, stats, results_store)
|
|
8015
8002
|
|
|
8016
8003
|
ssl_cert = None
|
|
8017
8004
|
if any(port[0] == 443 for port in tcp_ports):
|
|
@@ -8055,9 +8042,10 @@ def udp_tcp():
|
|
|
8055
8042
|
f.write("=" * 60 + "\n\n")
|
|
8056
8043
|
f.flush()
|
|
8057
8044
|
|
|
8058
|
-
|
|
8045
|
+
# Simple fast progress bar - update only when targets complete
|
|
8046
|
+
with tqdm(total=len(targets), desc="Scanning", unit="target") as pbar:
|
|
8059
8047
|
with ThreadPoolExecutor(max_workers=100) as executor:
|
|
8060
|
-
future_to_ip = {executor.submit(scan_target, ip, stats,
|
|
8048
|
+
future_to_ip = {executor.submit(scan_target, ip, stats, results_store): ip for ip in targets}
|
|
8061
8049
|
for future in as_completed(future_to_ip):
|
|
8062
8050
|
ip = future_to_ip[future]
|
|
8063
8051
|
try:
|
|
@@ -8066,9 +8054,11 @@ def udp_tcp():
|
|
|
8066
8054
|
all_results[ip_result] = (tcp_ports, udp_ports, ssl_cert)
|
|
8067
8055
|
except Exception:
|
|
8068
8056
|
pass
|
|
8057
|
+
|
|
8069
8058
|
pbar.update(1)
|
|
8070
8059
|
pbar.set_description(f"TCP: {stats['tcp']} UDP: {stats['udp']}")
|
|
8071
8060
|
|
|
8061
|
+
# Save results after each target completes
|
|
8072
8062
|
save_live_results(results_store, f)
|
|
8073
8063
|
|
|
8074
8064
|
f.write("\n" + "=" * 60 + "\n")
|
|
@@ -13448,6 +13438,7 @@ def update():
|
|
|
13448
13438
|
|
|
13449
13439
|
import subprocess
|
|
13450
13440
|
import sys
|
|
13441
|
+
import time
|
|
13451
13442
|
|
|
13452
13443
|
def run_pip_command(command):
|
|
13453
13444
|
"""Run a pip command and return the result."""
|
|
@@ -13490,12 +13481,14 @@ def update():
|
|
|
13490
13481
|
else:
|
|
13491
13482
|
print(f"Installation/update of {package_name} failed.")
|
|
13492
13483
|
sys.exit(1)
|
|
13484
|
+
|
|
13485
|
+
# Optional: Brief pause to see output before exiting
|
|
13486
|
+
time.sleep(2)
|
|
13487
|
+
|
|
13488
|
+
# Exit successfully
|
|
13489
|
+
sys.exit(0)
|
|
13493
13490
|
|
|
13494
13491
|
mainfire()
|
|
13495
|
-
time.sleep(1)
|
|
13496
|
-
randomshit(return_message)
|
|
13497
|
-
input()
|
|
13498
|
-
sys.exit
|
|
13499
13492
|
|
|
13500
13493
|
def update00():
|
|
13501
13494
|
|
|
@@ -16950,7 +16943,7 @@ def banner():
|
|
|
16950
16943
|
MAGENTA + "██╔═══╝ ██╔══██╗██║ ██║" + LIME + "user should understand that useage of this script may be" + ENDC,
|
|
16951
16944
|
MAGENTA + "██║ ██║ ██║╚██████╔╝" + LIME + "concidered an attack on a data network, and may violate terms" + ENDC,
|
|
16952
16945
|
MAGENTA + "╚═╝ ╚═╝ ╚═╝ ╚═════╝" + LIME + "of service, use on your own network or get permission first" + ENDC,
|
|
16953
|
-
PURPLE + "script_version@ 1.2.
|
|
16946
|
+
PURPLE + "script_version@ 1.2.4 ®" + ENDC,
|
|
16954
16947
|
ORANGE + "All rights reserved 2022-2025 ♛: ®" + ENDC,
|
|
16955
16948
|
MAGENTA + "In Collaboration whit Ayan Rajpoot ® " + ENDC,
|
|
16956
16949
|
BLUE + "Support: https://t.me/BugScanX 💬" + ENDC,
|
bhp_pro-1.2.3.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
bhp_pro.py,sha256=rF2jOsRh8wscEdzWp9kKFNtX4SItwfh99oy9R80iN0Q,744358
|
|
2
|
-
bhp_pro-1.2.3.dist-info/METADATA,sha256=QRATsusWg7bRojFoFOe774rXyUbf0cerWwY_Ejo591w,600
|
|
3
|
-
bhp_pro-1.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
-
bhp_pro-1.2.3.dist-info/entry_points.txt,sha256=Yn3HpraGX3lXX4FPq3Gm-lHh3SwQA-5rtgPWNWMFXkw,41
|
|
5
|
-
bhp_pro-1.2.3.dist-info/top_level.txt,sha256=1xjbIaVM77UJz9Tsi1JjILgE0YDG7iLhY6KSMNEi9zM,8
|
|
6
|
-
bhp_pro-1.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|