Class: Pwnix::Api::Client::Utility

Inherits:
Object
  • Object
show all
Includes:
HTTParty, HTTPartyTime
Defined in:
lib/pwnix-api-client/system/utility.rb

Instance Method Summary collapse

Methods included from HTTPartyTime

#clear_errors, #errors, #has_errors?, included, #last_error, #safe_api_call

Constructor Details

#initializeUtility

Returns a new instance of Utility.



8
9
# File 'lib/pwnix-api-client/system/utility.rb', line 8

def initialize
end

Instance Method Details

#nmap(ip) ⇒ Object



15
16
17
# File 'lib/pwnix-api-client/system/utility.rb', line 15

def nmap(ip)
  safe_api_call("/system/utility/nmap", { :ip => ip } )
end

#ping(ip) ⇒ Object



11
12
13
# File 'lib/pwnix-api-client/system/utility.rb', line 11

def ping(ip)
  safe_api_call("/system/utility/ping", { :ip => ip } )
end

#run_command(command) ⇒ Object



23
24
25
# File 'lib/pwnix-api-client/system/utility.rb', line 23

def run_command(command)
  safe_api_call("/system/utility/run_command", { :command => command } )
end

#traceroute(ip) ⇒ Object



19
20
21
# File 'lib/pwnix-api-client/system/utility.rb', line 19

def traceroute(ip)
  safe_api_call("/system/utility/traceroute", { :ip => ip } )
end