printerxpl-forge 6.2.0__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.
- nse/README.md +204 -0
- nse/__init__.py +6 -0
- nse/install_nse.py +412 -0
- nse/lib/printerxpl.lua +238 -0
- nse/scripts/cups-info.nse +74 -0
- nse/scripts/cups-queue-info.nse +43 -0
- nse/scripts/hp-printers-cve-2022-1026.nse +121 -0
- nse/scripts/http-device-mac.nse +107 -0
- nse/scripts/http-hp-ilo-info.nse +121 -0
- nse/scripts/http-info-xerox-enum.nse +101 -0
- nse/scripts/http-vuln-cve2022-1026.nse +158 -0
- nse/scripts/lexmark-config.nse +89 -0
- nse/scripts/pjl-ready-message.nse +106 -0
- nse/scripts/printer-banner.nse +217 -0
- nse/scripts/printer-cups-rce.nse +189 -0
- nse/scripts/printer-cve-detect.nse +279 -0
- nse/scripts/printer-discover.nse +205 -0
- nse/scripts/printer-firmware-exposed.nse +219 -0
- nse/scripts/printer-hp-pjl.nse +192 -0
- nse/scripts/printer-http-ews.nse +293 -0
- nse/scripts/printer-ipp-info.nse +235 -0
- nse/scripts/printer-lexmark-ipp.nse +203 -0
- nse/scripts/printer-passback.nse +204 -0
- nse/scripts/printer-pjl-info.nse +146 -0
- nse/scripts/printer-printnightmare.nse +211 -0
- nse/scripts/printer-snmp-info.nse +176 -0
- nse/scripts/printer-vuln-check.nse +256 -0
- nse/scripts/snmp-device-mac.nse +93 -0
- nse/scripts/snmp-info.nse +146 -0
- nse/scripts/snmp-sysdescr.nse +70 -0
- printerxpl_forge-6.2.0.dist-info/METADATA +919 -0
- printerxpl_forge-6.2.0.dist-info/RECORD +97 -0
- printerxpl_forge-6.2.0.dist-info/WHEEL +5 -0
- printerxpl_forge-6.2.0.dist-info/entry_points.txt +4 -0
- printerxpl_forge-6.2.0.dist-info/licenses/LICENSE +21 -0
- printerxpl_forge-6.2.0.dist-info/top_level.txt +4 -0
- src/assets/fonts/gunplay.pfa +1671 -0
- src/assets/fonts/kshandwrt.pfa +315 -0
- src/assets/fonts/laksoner.pfa +2402 -0
- src/assets/fonts/paintcans.pfa +9699 -0
- src/assets/fonts/stencilod.pfa +4076 -0
- src/assets/fonts/takecover.pfa +26138 -0
- src/assets/fonts/topsecret.pfa +6652 -0
- src/assets/fonts/whoa.pfa +773 -0
- src/assets/mibs/HOST-RESOURCES-MIB +1540 -0
- src/assets/mibs/Printer-MIB +4389 -0
- src/assets/mibs/README.md +9 -0
- src/assets/mibs/SNMPv2-MIB +854 -0
- src/assets/overlays/hacker.eps +596 -0
- src/assets/overlays/smiley.eps +214 -0
- src/assets/overlays/smiley2.eps +240 -0
- src/core/attack_orchestrator.py +1025 -0
- src/core/capabilities.py +323 -0
- src/core/destructive_audit.py +430 -0
- src/core/discovery.py +488 -0
- src/core/osdetect.py +74 -0
- src/core/poly_runner.py +579 -0
- src/core/printer.py +1426 -0
- src/main.py +2134 -0
- src/modules/install_printer.py +318 -0
- src/modules/login_bruteforce.py +852 -0
- src/modules/pcl.py +506 -0
- src/modules/pjl.py +3575 -0
- src/modules/print_job.py +1290 -0
- src/modules/ps.py +1102 -0
- src/payloads/__init__.py +98 -0
- src/payloads/assets/overlays/notice.eps +9 -0
- src/protocols/__init__.py +19 -0
- src/protocols/firmware.py +738 -0
- src/protocols/ipp.py +216 -0
- src/protocols/ipp_attacks.py +609 -0
- src/protocols/lpd.py +141 -0
- src/protocols/network_map.py +1004 -0
- src/protocols/raw.py +173 -0
- src/protocols/smb.py +359 -0
- src/protocols/ssrf_pivot.py +427 -0
- src/protocols/storage.py +587 -0
- src/ui/__init__.py +6 -0
- src/ui/interactive.py +742 -0
- src/ui/spinner.py +112 -0
- src/ui/tables.py +132 -0
- src/utils/banner_grabber.py +852 -0
- src/utils/codebook.py +456 -0
- src/utils/config.py +522 -0
- src/utils/cve_loader.py +158 -0
- src/utils/default_creds.py +134 -0
- src/utils/discovery_online.py +1327 -0
- src/utils/exploit_manager.py +805 -0
- src/utils/fuzzer.py +220 -0
- src/utils/helper.py +732 -0
- src/utils/local_printers.py +307 -0
- src/utils/ml_engine.py +491 -0
- src/utils/operators.py +474 -0
- src/utils/ports.py +234 -0
- src/utils/vuln_scanner.py +823 -0
- src/utils/wordlist_loader.py +412 -0
- src/version.py +36 -0
src/payloads/__init__.py
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
Payloads Package for PrinterXPL-Forge
|
|
5
|
+
=========================================
|
|
6
|
+
Pre-built attack payloads for PostScript and PJL
|
|
7
|
+
|
|
8
|
+
Payloads include:
|
|
9
|
+
- banner.ps - Print custom banner
|
|
10
|
+
- loop.ps - Infinite loop (DoS)
|
|
11
|
+
- erase.ps - Erase page
|
|
12
|
+
- storm.ps - Print storm attack
|
|
13
|
+
- exfil.ps - Data exfiltration template
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
# Author : Andre Henrique (@mrhenrike)
|
|
17
|
+
# GitHub : https://github.com/mrhenrike
|
|
18
|
+
# LinkedIn : https://linkedin.com/in/mrhenrike
|
|
19
|
+
# X/Twitter : https://x.com/mrhenrike
|
|
20
|
+
|
|
21
|
+
__all__ = ['load_payload', 'list_payloads', 'execute_payload']
|
|
22
|
+
|
|
23
|
+
import os
|
|
24
|
+
import re
|
|
25
|
+
|
|
26
|
+
# Payload directory
|
|
27
|
+
PAYLOAD_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
28
|
+
|
|
29
|
+
def list_payloads():
|
|
30
|
+
"""List all available payloads"""
|
|
31
|
+
payloads = []
|
|
32
|
+
for file in os.listdir(PAYLOAD_DIR):
|
|
33
|
+
if file.endswith('.ps') or file.endswith('.pjl') or file.endswith('.pcl'):
|
|
34
|
+
payloads.append(file)
|
|
35
|
+
return sorted(payloads)
|
|
36
|
+
|
|
37
|
+
def load_payload(payload_name, substitutions=None):
|
|
38
|
+
"""
|
|
39
|
+
Load payload from file and substitute variables
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
payload_name: Name of payload file (e.g., 'banner.ps')
|
|
43
|
+
substitutions: Dict of {variable: value} to substitute
|
|
44
|
+
|
|
45
|
+
Returns:
|
|
46
|
+
Payload content with substitutions applied
|
|
47
|
+
|
|
48
|
+
Example:
|
|
49
|
+
payload = load_payload('banner.ps', {'msg': 'HACKED!'})
|
|
50
|
+
"""
|
|
51
|
+
payload_path = os.path.join(PAYLOAD_DIR, payload_name)
|
|
52
|
+
|
|
53
|
+
if not os.path.exists(payload_path):
|
|
54
|
+
raise FileNotFoundError(f"Payload not found: {payload_name}")
|
|
55
|
+
|
|
56
|
+
with open(payload_path, 'r', encoding='utf-8') as f:
|
|
57
|
+
content = f.read()
|
|
58
|
+
|
|
59
|
+
# Apply substitutions if provided
|
|
60
|
+
if substitutions:
|
|
61
|
+
# Find all {{variable}} patterns
|
|
62
|
+
placeholders = re.findall(r'\\{\\{(.*?)\\}\\}', content)
|
|
63
|
+
|
|
64
|
+
# Check for missing substitutions
|
|
65
|
+
missing = [p for p in placeholders if p not in substitutions]
|
|
66
|
+
if missing:
|
|
67
|
+
raise ValueError(f"Missing substitutions: {', '.join(missing)}")
|
|
68
|
+
|
|
69
|
+
# Apply substitutions
|
|
70
|
+
for key, value in substitutions.items():
|
|
71
|
+
content = content.replace(f'{{{{{key}}}}}', str(value))
|
|
72
|
+
|
|
73
|
+
return content
|
|
74
|
+
|
|
75
|
+
def execute_payload(printer_conn, payload_name, substitutions=None):
|
|
76
|
+
"""
|
|
77
|
+
Execute payload on printer
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
printer_conn: Active printer connection
|
|
81
|
+
payload_name: Name of payload file
|
|
82
|
+
substitutions: Dict of variables to substitute
|
|
83
|
+
|
|
84
|
+
Returns:
|
|
85
|
+
Response from printer
|
|
86
|
+
"""
|
|
87
|
+
payload = load_payload(payload_name, substitutions)
|
|
88
|
+
|
|
89
|
+
# Send payload
|
|
90
|
+
printer_conn.send(payload.encode())
|
|
91
|
+
|
|
92
|
+
# Receive response (with timeout)
|
|
93
|
+
try:
|
|
94
|
+
response = printer_conn.recv(4096)
|
|
95
|
+
return response.decode('latin-1', errors='ignore')
|
|
96
|
+
except:
|
|
97
|
+
return ""
|
|
98
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
%!PS-Adobe-2.0 EPSF-2.0
|
|
2
|
+
%%Title: PrinterXPL-Forge Overlay Notice
|
|
3
|
+
%%Creator: PrinterXPL-Forge v2.5.0
|
|
4
|
+
%%BoundingBox: 0 0 300 50
|
|
5
|
+
/F { /Helvetica-Bold findfont exch scalefont setfont } bind def
|
|
6
|
+
0 0 0 setrgbcolor
|
|
7
|
+
10 20 moveto 24 F (CONFIDENTIAL - PrinterXPL-Forge) show
|
|
8
|
+
showpage
|
|
9
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# -*- coding: utf-8 -*-
|
|
3
|
+
"""
|
|
4
|
+
Network Protocols Package for PrinterXPL-Forge
|
|
5
|
+
==================================================
|
|
6
|
+
Support for multiple network printing protocols:
|
|
7
|
+
- LPD (Line Printer Daemon) - Port 515
|
|
8
|
+
- IPP (Internet Printing Protocol) - Port 631
|
|
9
|
+
- RAW (Raw TCP/IP) - Port 9100 (default)
|
|
10
|
+
- SMB (Server Message Block) - Port 445/139
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
# Author : Andre Henrique (@mrhenrike)
|
|
14
|
+
# GitHub : https://github.com/mrhenrike
|
|
15
|
+
# LinkedIn : https://linkedin.com/in/mrhenrike
|
|
16
|
+
# X/Twitter : https://x.com/mrhenrike
|
|
17
|
+
|
|
18
|
+
__all__ = ['lpd', 'ipp', 'raw', 'smb']
|
|
19
|
+
|