From f69b4a330e8f3020ac48cf5eb63ebc16008dbf1b Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 17 Jan 2017 14:09:27 -0600 Subject: [PATCH] handle Ruby 2.4 Fixnum/Bignum -> Integer deprecations --- lib/metasm/metasm/main.rb | 4 +- lib/metasploit/framework/jtr/cracker.rb | 2 +- .../framework/login_scanner/base.rb | 12 +- lib/metasploit/framework/login_scanner/ftp.rb | 2 +- .../framework/login_scanner/http.rb | 12 +- .../framework/login_scanner/result.rb | 2 +- .../framework/login_scanner/snmp.rb | 2 +- .../framework/login_scanner/telnet.rb | 4 +- .../login_scanner/wordpress_multicall.rb | 4 +- lib/metasploit/framework/ntds/account.rb | 8 +- lib/metasploit/framework/tcp/client.rb | 4 +- lib/msf/core/auxiliary/fuzzer.rb | 8 +- lib/msf/core/auxiliary/nmap.rb | 2 +- lib/msf/core/auxiliary/report.rb | 4 +- lib/msf/core/db_export.rb | 2 +- lib/msf/core/db_manager/ip_address.rb | 2 +- lib/msf/core/exploit/browser_autopwn2.rb | 6 +- lib/msf/core/exploit/java/rmi/builder.rb | 26 ++--- lib/msf/core/exploit/java/rmi/client.rb | 10 +- .../core/exploit/java/rmi/client/registry.rb | 2 +- lib/msf/core/exploit/java/rmi/util.rb | 8 +- lib/msf/core/exploit/kerberos/client.rb | 8 +- .../exploit/kerberos/client/as_request.rb | 14 +-- .../exploit/kerberos/client/as_response.rb | 2 +- lib/msf/core/exploit/kerberos/client/base.rb | 8 +- .../kerberos/client/cache_credential.rb | 28 ++--- lib/msf/core/exploit/kerberos/client/pac.rb | 8 +- .../exploit/kerberos/client/tgs_request.rb | 24 ++-- lib/msf/core/exploit/oracle.rb | 6 +- lib/msf/core/exploit/postgres.rb | 4 +- lib/msf/core/exploit/smb/server/share.rb | 8 +- .../exploit/smb/server/share/command/close.rb | 4 +- .../smb/server/share/command/negotiate.rb | 24 ++-- .../server/share/command/nt_create_andx.rb | 16 +-- .../smb/server/share/command/read_andx.rb | 10 +- .../share/command/session_setup_andx.rb | 14 +-- .../smb/server/share/command/trans2.rb | 4 +- .../share/command/trans2/find_first2.rb | 2 +- .../command/trans2/query_file_information.rb | 2 +- .../command/trans2/query_path_information.rb | 2 +- .../server/share/information_level/find.rb | 42 +++---- .../server/share/information_level/query.rb | 44 +++---- lib/msf/core/module/ui/message.rb | 2 +- lib/msf/core/payload/linux/bind_tcp.rb | 2 +- lib/msf/core/payload/linux/reverse_tcp.rb | 2 +- lib/msf/core/payload/uuid.rb | 8 +- lib/msf/core/payload/uuid/options.rb | 2 +- lib/msf/core/payload/windows/bind_tcp.rb | 2 +- lib/msf/core/payload/windows/reverse_http.rb | 6 +- lib/msf/core/payload/windows/reverse_tcp.rb | 4 +- .../core/payload/windows/reverse_tcp_dns.rb | 4 +- .../core/payload/windows/reverse_tcp_rc4.rb | 2 +- .../core/payload/windows/reverse_winhttp.rb | 4 +- lib/msf/core/payload/windows/x64/bind_tcp.rb | 2 +- .../core/payload/windows/x64/reverse_http.rb | 6 +- .../core/payload/windows/x64/reverse_tcp.rb | 2 +- .../payload/windows/x64/reverse_winhttp.rb | 4 +- lib/msf/core/payload_generator.rb | 16 +-- lib/msf/core/post.rb | 2 +- lib/msf/core/post/file.rb | 2 +- lib/msf/core/post/windows/accounts.rb | 4 +- lib/msf/core/post/windows/ldap.rb | 10 +- lib/msf/core/post/windows/process.rb | 4 +- .../post/windows/reflective_dll_injection.rb | 2 +- lib/msf/core/post/windows/services.rb | 10 +- lib/msf/core/post_mixin.rb | 6 +- lib/msf/core/reflective_dll_loader.rb | 4 +- lib/msf/core/rpc/v10/constants.rb | 4 +- lib/msf/core/rpc/v10/rpc_base.rb | 2 +- lib/msf/core/rpc/v10/rpc_console.rb | 18 +-- lib/msf/core/rpc/v10/rpc_core.rb | 38 +++--- lib/msf/core/rpc/v10/rpc_db.rb | 108 +++++++++--------- lib/msf/core/rpc/v10/rpc_job.rb | 8 +- lib/msf/core/rpc/v10/rpc_module.rb | 8 +- lib/msf/core/rpc/v10/rpc_session.rb | 46 ++++---- lib/msf/ui/console/command_dispatcher/db.rb | 2 +- lib/msf/util/exe.rb | 2 +- lib/msf/util/payload_cached_size.rb | 6 +- lib/net/dns/rr/classes.rb | 6 +- lib/net/dns/rr/types.rb | 6 +- lib/rex/payloads/meterpreter/uri_checksum.rb | 10 +- .../post/meterpreter/extensions/kiwi/kiwi.rb | 4 +- .../extensions/stdapi/railgun/dll.rb | 18 ++- .../extensions/stdapi/railgun/dll_helper.rb | 6 +- .../extensions/stdapi/railgun/multicall.rb | 16 ++- .../stdapi/railgun/type/pointer_util.rb | 2 +- .../extensions/stdapi/railgun/util.rb | 2 +- lib/rex/post/meterpreter/packet.rb | 2 +- lib/rex/post/meterpreter/packet_dispatcher.rb | 4 +- .../meterpreter/packet_response_waiter.rb | 4 +- lib/rex/proto/dcerpc/svcctl/packet.rb | 34 +++--- lib/rex/proto/http/client.rb | 4 +- lib/rex/proto/kerberos/client.rb | 8 +- .../proto/kerberos/credential_cache/cache.rb | 2 +- .../kerberos/credential_cache/credential.rb | 4 +- .../kerberos/credential_cache/key_block.rb | 4 +- .../kerberos/credential_cache/principal.rb | 2 +- .../proto/kerberos/credential_cache/time.rb | 8 +- lib/rex/proto/kerberos/crypto/rc4_hmac.rb | 4 +- lib/rex/proto/kerberos/model/ap_req.rb | 6 +- lib/rex/proto/kerberos/model/authenticator.rb | 6 +- .../kerberos/model/authorization_data.rb | 6 +- lib/rex/proto/kerberos/model/checksum.rb | 2 +- .../proto/kerberos/model/enc_kdc_response.rb | 8 +- .../proto/kerberos/model/encrypted_data.rb | 10 +- .../proto/kerberos/model/encryption_key.rb | 4 +- lib/rex/proto/kerberos/model/kdc_request.rb | 8 +- .../proto/kerberos/model/kdc_request_body.rb | 16 +-- lib/rex/proto/kerberos/model/kdc_response.rb | 8 +- lib/rex/proto/kerberos/model/krb_error.rb | 20 ++-- lib/rex/proto/kerberos/model/last_request.rb | 4 +- lib/rex/proto/kerberos/model/pre_auth_data.rb | 6 +- .../kerberos/model/pre_auth_enc_time_stamp.rb | 6 +- .../proto/kerberos/model/principal_name.rb | 4 +- lib/rex/proto/kerberos/model/ticket.rb | 4 +- lib/rex/proto/kerberos/pac/logon_info.rb | 6 +- .../proto/kerberos/pac/priv_svr_checksum.rb | 2 +- lib/rex/proto/kerberos/pac/server_checksum.rb | 2 +- lib/rex/proto/kerberos/pac/type.rb | 2 +- lib/rex/proto/pjl/client.rb | 2 +- lib/rex/proto/rmi/model/call.rb | 2 +- lib/rex/proto/rmi/model/call_data.rb | 12 +- lib/rex/proto/rmi/model/continuation.rb | 8 +- lib/rex/proto/rmi/model/dgc_ack.rb | 2 +- lib/rex/proto/rmi/model/element.rb | 10 +- lib/rex/proto/rmi/model/output_header.rb | 8 +- lib/rex/proto/rmi/model/ping.rb | 2 +- lib/rex/proto/rmi/model/ping_ack.rb | 2 +- lib/rex/proto/rmi/model/protocol_ack.rb | 10 +- lib/rex/proto/rmi/model/return_data.rb | 2 +- lib/rex/proto/rmi/model/return_value.rb | 2 +- lib/rex/proto/rmi/model/unique_identifier.rb | 12 +- lib/rex/proto/steam/message.rb | 6 +- lib/snmp/ber.rb | 8 +- lib/snmp/varbind.rb | 2 +- .../http/wp_wplms_privilege_escalation.rb | 2 +- .../auxiliary/spoof/llmnr/llmnr_response.rb | 2 +- ...sonicwall_scrutinizer_methoddetail_sqli.rb | 2 +- .../exploits/multi/misc/java_jdwp_debugger.rb | 4 +- .../windows/fileformat/fdm_torrent.rb | 2 +- .../post/windows/capture/keylog_recorder.rb | 2 +- .../post/windows/gather/credentials/vnc.rb | 2 +- modules/post/windows/manage/priv_migrate.rb | 4 +- plugins/wiki.rb | 2 +- .../kerberos/client/as_response_spec.rb | 2 +- spec/lib/net/dns/names/names_spec.rb | 2 +- spec/lib/net/dns/rr/classes_spec.rb | 4 +- spec/lib/net/dns/rr/types_spec.rb | 4 +- test/hooks/string_idx.rb | 4 +- tools/exploit/egghunter.rb | 4 +- tools/exploit/java_deserializer.rb | 6 +- tools/exploit/jsobfu.rb | 2 +- tools/exploit/virustotal.rb | 4 +- tools/password/md5_lookup.rb | 2 +- 154 files changed, 595 insertions(+), 585 deletions(-) diff --git a/lib/metasm/metasm/main.rb b/lib/metasm/metasm/main.rb index 5260a156de..cef8eda375 100644 --- a/lib/metasm/metasm/main.rb +++ b/lib/metasm/metasm/main.rb @@ -1128,11 +1128,11 @@ class EncodedData ((val + len - 1) / len).to_i * len end - # concatenation of another +EncodedData+ (or nil/Fixnum/anything supporting String#<<) + # concatenation of another +EncodedData+ (or nil/Integer/anything supporting String#<<) def <<(other) case other when nil - when ::Fixnum + when ::Integer fill @data = @data.to_str if not @data.kind_of? String @data << other diff --git a/lib/metasploit/framework/jtr/cracker.rb b/lib/metasploit/framework/jtr/cracker.rb index ea1c71e020..a84346563d 100644 --- a/lib/metasploit/framework/jtr/cracker.rb +++ b/lib/metasploit/framework/jtr/cracker.rb @@ -33,7 +33,7 @@ module Metasploit attr_accessor :john_path # @!attribute max_runtime - # @return [Fixnum] An optional maximum duration of the cracking attempt in seconds + # @return [Integer] An optional maximum duration of the cracking attempt in seconds attr_accessor :max_runtime # @!attribute pot diff --git a/lib/metasploit/framework/login_scanner/base.rb b/lib/metasploit/framework/login_scanner/base.rb index 445bfe4ed1..9d884545b9 100644 --- a/lib/metasploit/framework/login_scanner/base.rb +++ b/lib/metasploit/framework/login_scanner/base.rb @@ -19,7 +19,7 @@ module Metasploit # @return [Object] The framework module caller, if availale attr_accessor :framework_module # @!attribute connection_timeout - # @return [Fixnum] The timeout in seconds for a single SSH connection + # @return [Integer] The timeout in seconds for a single SSH connection attr_accessor :connection_timeout # @!attribute cred_details # @return [CredentialCollection] Collection of Credential objects @@ -28,13 +28,13 @@ module Metasploit # @return [String] The IP address or hostname to connect to attr_accessor :host # @!attribute port - # @return [Fixnum] The port to connect to + # @return [Integer] The port to connect to attr_accessor :port # @!attribute host # @return [String] The local host for outgoing connections attr_accessor :local_host # @!attribute port - # @return [Fixnum] The local port for outgoing connections + # @return [Integer] The local port for outgoing connections attr_accessor :local_port # @!attribute proxies # @return [String] The proxy directive to use for the socket @@ -43,7 +43,7 @@ module Metasploit # @return [Boolean] Whether the scanner should stop when it has found one working Credential attr_accessor :stop_on_success # @!attribute bruteforce_speed - # @return [Fixnum] The desired speed, with 5 being 'fast' and 0 being 'slow.' + # @return [Integer] The desired speed, with 5 being 'fast' and 0 being 'slow.' attr_accessor :bruteforce_speed validates :connection_timeout, @@ -115,7 +115,7 @@ module Metasploit # overridden, the override should probably do something sensible # with {#bruteforce_speed} # - # @return [Fixnum] a number of seconds to sleep between attempts + # @return [Integer] a number of seconds to sleep between attempts def sleep_time case bruteforce_speed when 0; 60 * 5 @@ -129,7 +129,7 @@ module Metasploit # A threadsafe sleep method # - # @param time [Fixnum] number of seconds (can be a Float), defaults + # @param time [Integer] number of seconds (can be a Float), defaults # to {#sleep_time} # # @return [void] diff --git a/lib/metasploit/framework/login_scanner/ftp.rb b/lib/metasploit/framework/login_scanner/ftp.rb index 6c8ad94028..1da669e959 100644 --- a/lib/metasploit/framework/login_scanner/ftp.rb +++ b/lib/metasploit/framework/login_scanner/ftp.rb @@ -21,7 +21,7 @@ module Metasploit REALM_KEY = nil # @!attribute ftp_timeout - # @return [Fixnum] The timeout in seconds to wait for a response to an FTP command + # @return [Integer] The timeout in seconds to wait for a response to an FTP command attr_accessor :ftp_timeout validates :ftp_timeout, diff --git a/lib/metasploit/framework/login_scanner/http.rb b/lib/metasploit/framework/login_scanner/http.rb index df40e14047..09fb042051 100644 --- a/lib/metasploit/framework/login_scanner/http.rb +++ b/lib/metasploit/framework/login_scanner/http.rb @@ -46,11 +46,11 @@ module Metasploit attr_accessor :evade_uri_full_url # @!attribute evade_pad_method_uri_count - # @return [Fixnum] How many whitespace characters to use between the method and uri + # @return [Integer] How many whitespace characters to use between the method and uri attr_accessor :evade_pad_method_uri_count # @!attribute evade_pad_uri_version_count - # @return [Fixnum] How many whitespace characters to use between the uri and version + # @return [Integer] How many whitespace characters to use between the uri and version attr_accessor :evade_pad_uri_version_count # @!attribute evade_pad_method_uri_type @@ -98,7 +98,7 @@ module Metasploit attr_accessor :evade_pad_fake_headers # @!attribute evade_pad_fake_headers_count - # @return [Fixnum] How many fake headers to insert into the HTTP request + # @return [Integer] How many fake headers to insert into the HTTP request attr_accessor :evade_pad_fake_headers_count # @!attribute evade_pad_get_params @@ -106,7 +106,7 @@ module Metasploit attr_accessor :evade_pad_get_params # @!attribute evade_pad_get_params_count - # @return [Fixnum] How many fake query string variables to insert into the request + # @return [Integer] How many fake query string variables to insert into the request attr_accessor :evade_pad_get_params_count # @!attribute evade_pad_post_params @@ -114,7 +114,7 @@ module Metasploit attr_accessor :evade_pad_post_params # @!attribute evade_pad_post_params_count - # @return [Fixnum] How many fake post variables to insert into the request + # @return [Integer] How many fake post variables to insert into the request attr_accessor :evade_pad_post_params_count # @!attribute evade_uri_fake_end @@ -207,7 +207,7 @@ module Metasploit # # @param [Hash] opts native support includes the following (also see Rex::Proto::Http::Request#request_cgi) # @option opts [String] 'host' The remote host - # @option opts [Fixnum] 'port' The remote port + # @option opts [Integer] 'port' The remote port # @option opts [Boolean] 'ssl' The SSL setting, TrueClass or FalseClass # @option opts [String] 'proxies' The proxies setting # @option opts [Credential] 'credential' A credential object diff --git a/lib/metasploit/framework/login_scanner/result.rb b/lib/metasploit/framework/login_scanner/result.rb index c54cb3b5d6..3c2b0551df 100644 --- a/lib/metasploit/framework/login_scanner/result.rb +++ b/lib/metasploit/framework/login_scanner/result.rb @@ -18,7 +18,7 @@ module Metasploit # @return [String] the addess of the target host for this result attr_accessor :host # @!attribute port - # @return [Fixnum] the port number of the service for this result + # @return [Integer] the port number of the service for this result attr_accessor :port # @!attribute proof # @return [#to_s] the proof of the login's success or failure diff --git a/lib/metasploit/framework/login_scanner/snmp.rb b/lib/metasploit/framework/login_scanner/snmp.rb index 723d283c8e..19bb7e065e 100644 --- a/lib/metasploit/framework/login_scanner/snmp.rb +++ b/lib/metasploit/framework/login_scanner/snmp.rb @@ -31,7 +31,7 @@ module Metasploit attr_accessor :version # The number of logins to try in each batch - # @return [Fixnum] + # @return [Integer] attr_accessor :queue_size validates :version, diff --git a/lib/metasploit/framework/login_scanner/telnet.rb b/lib/metasploit/framework/login_scanner/telnet.rb index e7057b0022..ccd9c030b6 100644 --- a/lib/metasploit/framework/login_scanner/telnet.rb +++ b/lib/metasploit/framework/login_scanner/telnet.rb @@ -24,13 +24,13 @@ module Metasploit # @!attribute verbosity # The timeout to wait for the telnet banner. # - # @return [Fixnum] + # @return [Integer] attr_accessor :banner_timeout # @!attribute verbosity # The timeout to wait for the response from a telnet command. # - # @return [Fixnum] + # @return [Integer] attr_accessor :telnet_timeout # @!attribute verbosity diff --git a/lib/metasploit/framework/login_scanner/wordpress_multicall.rb b/lib/metasploit/framework/login_scanner/wordpress_multicall.rb index 8290a9e672..32e61bd76b 100644 --- a/lib/metasploit/framework/login_scanner/wordpress_multicall.rb +++ b/lib/metasploit/framework/login_scanner/wordpress_multicall.rb @@ -12,11 +12,11 @@ module Metasploit attr_accessor :passwords # @!attribute chunk_size, limits number of passwords per XML request - # @return [Fixnum] + # @return [Integer] attr_accessor :chunk_size # @!attribute block_wait, time to wait if got blocked by the target - # @return [Fixnum] + # @return [Integer] attr_accessor :block_wait # @!attribute base_uri diff --git a/lib/metasploit/framework/ntds/account.rb b/lib/metasploit/framework/ntds/account.rb index d47a6507cc..af2ecfcb77 100644 --- a/lib/metasploit/framework/ntds/account.rb +++ b/lib/metasploit/framework/ntds/account.rb @@ -30,11 +30,11 @@ module Metasploit attr_accessor :lm_hash #@return [Array] The LM hashes for previous passwords, up to 24 attr_accessor :lm_history - #@return [Fixnum] The count of historical LM hashes + #@return [Integer] The count of historical LM hashes attr_accessor :lm_history_count #@return [Boolean] If the AD account is locked attr_accessor :locked - #@return [Fixnum] The number of times this account has logged in + #@return [Integer] The number of times this account has logged in attr_accessor :logon_count #@return [String] Human Readable Date for the last time the account logged in attr_accessor :logon_date @@ -50,13 +50,13 @@ module Metasploit attr_accessor :nt_hash #@return [Array] The NT hashes for previous passwords, up to 24 attr_accessor :nt_history - #@return [Fixnum] The count of historical NT hashes + #@return [Integer] The count of historical NT hashes attr_accessor :nt_history_count #@return [String] Human Readable Date for the last password change attr_accessor :pass_date #@return [String] Human Readable Time for the last password change attr_accessor :pass_time - #@return [Fixnum] The Relative ID of the account + #@return [Integer] The Relative ID of the account attr_accessor :rid #@return [String] Byte String for the Account's SID attr_accessor :sid diff --git a/lib/metasploit/framework/tcp/client.rb b/lib/metasploit/framework/tcp/client.rb index 195f12640a..b7af8a675d 100644 --- a/lib/metasploit/framework/tcp/client.rb +++ b/lib/metasploit/framework/tcp/client.rb @@ -43,10 +43,10 @@ module Metasploit extend ActiveSupport::Concern # @!attribute max_send_size - # @return [Fixnum] The max size of the data to encapsulate in a single packet + # @return [Integer] The max size of the data to encapsulate in a single packet attr_accessor :max_send_size # @!attribute send_delay - # @return [Fixnum] The delay between sending packets + # @return [Integer] The delay between sending packets attr_accessor :send_delay included do diff --git a/lib/msf/core/auxiliary/fuzzer.rb b/lib/msf/core/auxiliary/fuzzer.rb index 577b59091c..146be4c85e 100644 --- a/lib/msf/core/auxiliary/fuzzer.rb +++ b/lib/msf/core/auxiliary/fuzzer.rb @@ -21,7 +21,7 @@ module Auxiliary::Fuzzer # Will return or yield numbers based on the presence of a block. # # @return [Array] Returns an array of arrays of numbers if there is no block given - # @yield [Array] Yields an array of numbers if there is a block given + # @yield [Array] Yields an array of numbers if there is a block given # @see #fuzzer_number_power2 def fuzz_numbers @@ -51,7 +51,7 @@ module Auxiliary::Fuzzer # Modifies each byte of the string from beginning to end, packing each element as an 8 bit character. # # @param str [String] The string the mutation will be based on. - # @param max [Fixnum, NilClass] Max string size. + # @param max [Integer, NilClass] Max string size. # @return [Array] Returns an array of an array of strings # @see #fuzzer_string_format @@ -71,7 +71,7 @@ module Auxiliary::Fuzzer # Modifies each byte of the string from beginning to end, packing each element as an 8 bit character. # # @param str [String] The string the mutation will be based on. - # @param max [Fixnum, NilClass] Max string size. + # @param max [Integer, NilClass] Max string size. # @return [Array] Returns an array of an array of strings # @see fuzzer_string_format @@ -150,7 +150,7 @@ module Auxiliary::Fuzzer # Generates a fuzz string If no block is set, it will retrive characters from the # FuzzChar datastore option. # - # @param len [Fixnum] String size. + # @param len [Integer] String size. # @return [String] Returns a string of size 1024 * 512 specified by the user def fuzzer_gen_string(len) diff --git a/lib/msf/core/auxiliary/nmap.rb b/lib/msf/core/auxiliary/nmap.rb index fd32b94b0d..a966c8b1f1 100644 --- a/lib/msf/core/auxiliary/nmap.rb +++ b/lib/msf/core/auxiliary/nmap.rb @@ -181,7 +181,7 @@ end # and combinations thereof. def nmap_validate_rports # If there's an RPORT specified, use that instead. - if datastore['RPORT'] && (datastore['RPORT'].kind_of?(Fixnum) || !datastore['RPORT'].empty?) + if datastore['RPORT'] && (datastore['RPORT'].kind_of?(Integer) || !datastore['RPORT'].empty?) return true end if rports.nil? || rports.empty? diff --git a/lib/msf/core/auxiliary/report.rb b/lib/msf/core/auxiliary/report.rb index c701033d91..e074c8b2b5 100644 --- a/lib/msf/core/auxiliary/report.rb +++ b/lib/msf/core/auxiliary/report.rb @@ -70,7 +70,7 @@ module Auxiliary::Report # This method safely get the workspace ID. It handles if the db is not active # # @return [NilClass] if there is no DB connection - # @return [Fixnum] the ID of the current Mdm::Workspace + # @return [Integer] the ID of the current Mdm::Workspace def myworkspace_id if framework.db.active myworkspace.id @@ -170,7 +170,7 @@ module Auxiliary::Report # # @param opts [Hash] the option hash # @option opts [String] :host the address of the host (also takes a Mdm::Host) - # @option opts [Fixnum] :port the port of the connected service + # @option opts [Integer] :port the port of the connected service # @option opts [Mdm::Service] :service an optional Service object to build the cred for # @option opts [String] :type What type of private credential this is (e.g. "password", "hash", "ssh_key") # @option opts [String] :proto Which transport protocol the service uses diff --git a/lib/msf/core/db_export.rb b/lib/msf/core/db_export.rb index 109939e8e6..bd5449ba98 100644 --- a/lib/msf/core/db_export.rb +++ b/lib/msf/core/db_export.rb @@ -171,7 +171,7 @@ class Export case obj when String obj.strip - when TrueClass, FalseClass, Float, Fixnum, Bignum, Time + when TrueClass, FalseClass, Float, Integer, Time obj.to_s.strip when BigDecimal obj.to_s("F") diff --git a/lib/msf/core/db_manager/ip_address.rb b/lib/msf/core/db_manager/ip_address.rb index da215ecfa6..2210782d33 100644 --- a/lib/msf/core/db_manager/ip_address.rb +++ b/lib/msf/core/db_manager/ip_address.rb @@ -35,7 +35,7 @@ module Msf::DBManager::IPAddress else raise ArgumentError, "Invalid IP address: #{ip.inspect}" end - when Fixnum + when Integer if (0..2**32-1).include? ip ip_x = Rex::Socket.addr_itoa(ip) ip_i = ip diff --git a/lib/msf/core/exploit/browser_autopwn2.rb b/lib/msf/core/exploit/browser_autopwn2.rb index 9fc947289e..7270a03639 100644 --- a/lib/msf/core/exploit/browser_autopwn2.rb +++ b/lib/msf/core/exploit/browser_autopwn2.rb @@ -282,7 +282,7 @@ module Msf # Returns the selected payload's LPORT. # # @param platform [Symbol] - # @return [Fixnum] + # @return [Integer] def get_selected_payload_lport(platform) datastore["PAYLOAD_#{platform.to_s.upcase}_LPORT"] end @@ -353,7 +353,7 @@ module Msf # Returns the human-readable version of the rank. # - # @param rank [Fixnum] + # @param rank [Integer] # @return [String] def parse_rank(rank) RankingName[rank].to_s.capitalize @@ -716,7 +716,7 @@ module Msf # Returns a number of sessions obtained by BAP's payload handlers. # - # @return [Fixnum] A session count. + # @return [Integer] A session count. def session_count total = 0 diff --git a/lib/msf/core/exploit/java/rmi/builder.rb b/lib/msf/core/exploit/java/rmi/builder.rb index 4b563b8392..4588e8c528 100644 --- a/lib/msf/core/exploit/java/rmi/builder.rb +++ b/lib/msf/core/exploit/java/rmi/builder.rb @@ -10,10 +10,10 @@ module Msf module Builder # Builds a RMI header stream # - # @param opts [Hash{Symbol => }] + # @param opts [Hash{Symbol => }] # @option opts [String] :signature - # @option opts [Fixnum] :version - # @option opts [Fixnum] :protocol + # @option opts [Integer] :version + # @option opts [Integer] :protocol # @return [Rex::Proto::Rmi::Model::OutputHeader] def build_header(opts = {}) signature = opts[:signature] || Rex::Proto::Rmi::Model::SIGNATURE @@ -30,16 +30,16 @@ module Msf # Builds a RMI call stream # - # @param opts [Hash{Symbol => }] - # @option opts [Fixnum] :message_id - # @option opts [Fixnum] :object_number Random to identify the object. - # @option opts [Fixnum] :uid_number Identifies the VM where the object was generated. - # @option opts [Fixnum] :uid_time Time where the object was generated. - # @option opts [Fixnum] :uid_count Identifies different instance of the same object generated from the same VM + # @param opts [Hash{Symbol => }] + # @option opts [Integer] :message_id + # @option opts [Integer] :object_number Random to identify the object. + # @option opts [Integer] :uid_number Identifies the VM where the object was generated. + # @option opts [Integer] :uid_time Time where the object was generated. + # @option opts [Integer] :uid_count Identifies different instance of the same object generated from the same VM # at the same time. - # @option opts [Fixnum] :operation On JDK 1.1 stub protocol the operation index in the interface. On JDK 1.2 + # @option opts [Integer] :operation On JDK 1.1 stub protocol the operation index in the interface. On JDK 1.2 # it is -1. - # @option opts [Fixnum] :hash On JDK 1.1 stub protocol the stub's interface hash. On JDK1.2 is a hash + # @option opts [Integer] :hash On JDK 1.1 stub protocol the stub's interface hash. On JDK1.2 is a hash # representing the method to call. # @option opts [Array] :arguments # @return [Rex::Proto::Rmi::Model::Call] @@ -77,8 +77,8 @@ module Msf # Builds a RMI dgc ack stream # - # @param opts [Hash{Symbol => }] - # @option opts [Fixnum] :stream_id + # @param opts [Hash{Symbol => }] + # @option opts [Integer] :stream_id # @option opts [String] :unique_identifier # @return [Rex::Proto::Rmi::Model::DgcAck] def build_dgc_ack(opts = {}) diff --git a/lib/msf/core/exploit/java/rmi/client.rb b/lib/msf/core/exploit/java/rmi/client.rb index 7f8a04560d..ef1e7d25a7 100644 --- a/lib/msf/core/exploit/java/rmi/client.rb +++ b/lib/msf/core/exploit/java/rmi/client.rb @@ -32,7 +32,7 @@ module Msf # Returns the timeout to wait for data between read iterations # - # @return [Fixnum] + # @return [Integer] def read_loop_timeout datastore['RmiReadLoopTimeout'] || 1 end @@ -46,7 +46,7 @@ module Msf # Returns the target port # - # @return [Fixnum] + # @return [Integer] def rport datastore['RPORT'] end @@ -56,7 +56,7 @@ module Msf # # @param opts [Hash] # @option opts [Rex::Socket::Tcp] :sock - # @return [Fixnum] the number of bytes sent + # @return [Integer] the number of bytes sent # @see Msf::Rmi::Client::Streams#build_header def send_header(opts = {}) nsock = opts[:sock] || sock @@ -69,7 +69,7 @@ module Msf # @param opts [Hash] # @option opts [Rex::Socket::Tcp] :sock # @option opts [Rex::Proto::Rmi::Model::Call] :call - # @return [Fixnum] the number of bytes sent + # @return [Integer] the number of bytes sent # @see Msf::Rmi::Client::Streams#build_call def send_call(opts = {}) nsock = opts[:sock] || sock @@ -81,7 +81,7 @@ module Msf # # @param opts [Hash] # @option opts [Rex::Socket::Tcp] :sock - # @return [Fixnum] the number of bytes sent + # @return [Integer] the number of bytes sent # @see Msf::Rmi::Client::Streams#build_dgc_ack def send_dgc_ack(opts = {}) nsock = opts[:sock] || sock diff --git a/lib/msf/core/exploit/java/rmi/client/registry.rb b/lib/msf/core/exploit/java/rmi/client/registry.rb index 4d8a0b25d4..1a65b0e36d 100644 --- a/lib/msf/core/exploit/java/rmi/client/registry.rb +++ b/lib/msf/core/exploit/java/rmi/client/registry.rb @@ -91,7 +91,7 @@ module Msf # Calculates the hash to make RMI calls for the # java/rmi/registry/RegistryImpl_Stub interface # - # @return [Fixnum] The interface's hash + # @return [Integer] The interface's hash def registry_interface_hash hash = calculate_interface_hash( [ diff --git a/lib/msf/core/exploit/java/rmi/util.rb b/lib/msf/core/exploit/java/rmi/util.rb index 8371b711f0..0e351a291c 100644 --- a/lib/msf/core/exploit/java/rmi/util.rb +++ b/lib/msf/core/exploit/java/rmi/util.rb @@ -12,7 +12,7 @@ module Msf # # @param signature [String] The remote method signature as specified by the JDK 1.2, # method name + method descriptor (as explained in the Java Virtual Machine Specification) - # @return [Fixnum] The method hash + # @return [Integer] The method hash # @see http://docs.oracle.com/javase/8/docs/platform/rmi/spec/rmi-stubs24.html The RemoteRef Interface documentation to understand how method hashes are calculated def calculate_method_hash(signature) utf = Rex::Java::Serialization::Model::Utf.new(nil, signature) @@ -24,7 +24,7 @@ module Msf # Calculates an interface hash to make RMI calls as defined by the JDK 1.1 # # @param methods [Array] set of method names and their descriptors - # @return [Fixnum] The interface hash + # @return [Integer] The interface hash # @see http://docs.oracle.com/javase/8/docs/platform/rmi/spec/rmi-stubs24.html The RemoteRef Interface documentation to understand how interface hashes are calculated def calculate_interface_hash(methods) stream = '' @@ -68,7 +68,7 @@ module Msf # Extracts an int from an IO # # @param io [IO] the io to extract the int from - # @return [Fixnum, nil] the extracted int if success, nil otherwise + # @return [Integer, nil] the extracted int if success, nil otherwise def extract_int(io) int_raw = io.read(4) unless int_raw && int_raw.length == 4 @@ -82,7 +82,7 @@ module Msf # Extracts a long from an IO # # @param io [IO] the io to extract the long from - # @return [Fixnum, nil] the extracted int if success, nil otherwise + # @return [Integer, nil] the extracted int if success, nil otherwise def extract_long(io) int_raw = io.read(8) unless int_raw && int_raw.length == 8 diff --git a/lib/msf/core/exploit/kerberos/client.rb b/lib/msf/core/exploit/kerberos/client.rb index 3a6e7d36fb..68f120f36f 100644 --- a/lib/msf/core/exploit/kerberos/client.rb +++ b/lib/msf/core/exploit/kerberos/client.rb @@ -47,14 +47,14 @@ module Msf # Returns the remote port # - # @return [Fixnum] + # @return [Integer] def rport datastore['RPORT'] end # Returns the TCP timeout # - # @return [Fixnum] + # @return [Integer] def timeout datastore['Timeout'] end @@ -68,9 +68,9 @@ module Msf # Creates a kerberos connection # - # @param opts [Hash{Symbol => }] + # @param opts [Hash{Symbol => }] # @option opts [String] :rhost - # @option opts [] :rport + # @option opts [] :rport # @return [Rex::Proto::Kerberos::Client] def connect(opts={}) kerb_client = Rex::Proto::Kerberos::Client.new( diff --git a/lib/msf/core/exploit/kerberos/client/as_request.rb b/lib/msf/core/exploit/kerberos/client/as_request.rb index 62f2dc4593..3fac948d06 100644 --- a/lib/msf/core/exploit/kerberos/client/as_request.rb +++ b/lib/msf/core/exploit/kerberos/client/as_request.rb @@ -32,10 +32,10 @@ module Msf # Builds a kerberos PA-ENC-TIMESTAMP pre authenticated structure # - # @param opts [Hash{Symbol => }] + # @param opts [Hash{Symbol => }] # @option opts [Time] :time_stamp - # @option opts [Fixnum] :pausec - # @option opts [Fixnum] :etype + # @option opts [Integer] :pausec + # @option opts [Integer] :etype # @option opts [String] :key # @return [Rex::Proto::Kerberos::Model::PreAuthData] # @see Rex::Proto::Kerberos::Model::PreAuthEncTimeStamp @@ -67,13 +67,13 @@ module Msf # Builds a kerberos AS request body # - # @param opts [Hash{Symbol => }] - # @option opts [Fixnum] :options + # @param opts [Hash{Symbol => }] + # @option opts [Integer] :options # @option opts [Time] :from # @option opts [Time] :till # @option opts [Time] :rtime - # @option opts [Fixnum] :nonce - # @option opts [Fixnum] :etype + # @option opts [Integer] :nonce + # @option opts [Integer] :etype # @option opts [Rex::Proto::Kerberos::Model::PrincipalName] :cname # @option opts [String] :realm # @option opts [Rex::Proto::Kerberos::Model::PrincipalName] :sname diff --git a/lib/msf/core/exploit/kerberos/client/as_response.rb b/lib/msf/core/exploit/kerberos/client/as_response.rb index 3ebd852422..e5a38dfa60 100644 --- a/lib/msf/core/exploit/kerberos/client/as_response.rb +++ b/lib/msf/core/exploit/kerberos/client/as_response.rb @@ -28,7 +28,7 @@ module Msf # # @param res [Rex::Proto::Kerberos::Model::KdcResponse] # @param key [String] - # @return [Fixnum] + # @return [Integer] # @see Rex::Proto::Kerberos::Model::KdcResponse # @see Rex::Proto::Kerberos::Model::EncryptedData.decrypt # @see Rex::Proto::Kerberos::Model::EncKdcResponse diff --git a/lib/msf/core/exploit/kerberos/client/base.rb b/lib/msf/core/exploit/kerberos/client/base.rb index cb44a48507..05a3ea6e20 100644 --- a/lib/msf/core/exploit/kerberos/client/base.rb +++ b/lib/msf/core/exploit/kerberos/client/base.rb @@ -9,9 +9,9 @@ module Msf # Builds a kerberos Client Name Principal # - # @param opts [Hash{Symbol => }] + # @param opts [Hash{Symbol => }] # @option opts [String] :client_name the client's name - # @option opts [Fixnum] :client_type the client's name type + # @option opts [Integer] :client_type the client's name type # @return [Rex::Proto::Kerberos::Model::PrincipalName] # @see Rex::Proto::Kerberos::Model::PrincipalName def build_client_name(opts = {}) @@ -26,9 +26,9 @@ module Msf # Builds a kerberos Server Name Principal # - # @param opts [Hash{Symbol => }] + # @param opts [Hash{Symbol => }] # @option opts [String] :server_name the server's name - # @option opts [Fixnum] :server_type the server's name type + # @option opts [Integer] :server_type the server's name type # @return [Rex::Proto::Kerberos::Model::PrincipalName] # @see Rex::Proto::Kerberos::Model::PrincipalName def build_server_name(opts = {}) diff --git a/lib/msf/core/exploit/kerberos/client/cache_credential.rb b/lib/msf/core/exploit/kerberos/client/cache_credential.rb index 5c4eb96fa2..d35e9013d4 100644 --- a/lib/msf/core/exploit/kerberos/client/cache_credential.rb +++ b/lib/msf/core/exploit/kerberos/client/cache_credential.rb @@ -10,8 +10,8 @@ module Msf # Builds a MIT Credential Cache # - # @param opts [Hash{Symbol => , Rex::Proto::Kerberos::CredentialCache::Principal, Array>}] - # @option opts [Fixnum] :version + # @param opts [Hash{Symbol => , Rex::Proto::Kerberos::CredentialCache::Principal, Array>}] + # @option opts [Integer] :version # @option opts [Array] :headers # @option opts [Rex::Proto::Kerberos::CredentialCache::Principal] :primary_principal # @option opts [Array] :credentials @@ -35,8 +35,8 @@ module Msf # Builds a MIT Credential Cache principal # - # @param opts [Hash<{Symbol => >}>] - # @option opts [Fixnum] :name_type + # @param opts [Hash<{Symbol => >}>] + # @option opts [Integer] :name_type # @option opts [String] :realm # @option opts [Array] :components # @return [Rex::Proto::Kerberos::CredentialCache::Principal] @@ -57,9 +57,9 @@ module Msf # Builds a MIT Credential Cache key block # - # @param opts [Hash<{Symbol => }>] - # @option opts [Fixnum] :key_type - # @option opts [Fixnum] :e_type + # @param opts [Hash<{Symbol => }>] + # @option opts [Integer] :key_type + # @option opts [Integer] :e_type # @option opts [String] :key_value # @return [Rex::Proto::Kerberos::CredentialCache::KeyBlock] # @see Rex::Proto::Kerberos::CredentialCache::KeyBlock @@ -79,11 +79,11 @@ module Msf # Builds a times structure linked to a credential in a MIT Credential Cache # - # @param opts [Hash<{Symbol => Fixnum}>] - # @option opts [Fixnum] auth_time - # @option opts [Fixnum] start_time - # @option opts [Fixnum] end_time - # @option opts [Fixnum] renew_till + # @param opts [Hash<{Symbol => Integer}>] + # @option opts [Integer] auth_time + # @option opts [Integer] start_time + # @option opts [Integer] end_time + # @option opts [Integer] renew_till # @return [Rex::Proto::Kerberos::CredentialCache::Time] # @see Rex::Proto::Kerberos::CredentialCache::Time def create_cache_times(opts = {}) @@ -109,8 +109,8 @@ module Msf # @option opts [Rex::Proto::Kerberos::CredentialCache::Principal] server # @option opts [Rex::Proto::Kerberos::CredentialCache::KeyBlock] key # @option opts [Rex::Proto::Kerberos::CredentialCache::Time] time - # @option opts [Fixnum] is_key - # @option opts [Fixnum] flags + # @option opts [Integer] is_key + # @option opts [Integer] flags # @option opts [Array] addrs # @option opts [Array] auth_data # @option opts [String] ticket diff --git a/lib/msf/core/exploit/kerberos/client/pac.rb b/lib/msf/core/exploit/kerberos/client/pac.rb index 03bf256513..8c43424460 100644 --- a/lib/msf/core/exploit/kerberos/client/pac.rb +++ b/lib/msf/core/exploit/kerberos/client/pac.rb @@ -28,11 +28,11 @@ module Msf # Builds a kerberos PACTYPE structure # - # @param opts [Hash{Symbol => }] + # @param opts [Hash{Symbol => }] # @option opts [String] :client_name - # @option opts [Fixnum] :user_id the user SID Ex: 1000 - # @option opts [Fixnum] :group_id Ex: 513 for 'Domain Users' - # @option opts [Array] :group_ids + # @option opts [Integer] :user_id the user SID Ex: 1000 + # @option opts [Integer] :group_id Ex: 513 for 'Domain Users' + # @option opts [Array] :group_ids # @option opts [String] :realm # @option opts [String] :domain_id the domain SID Ex: S-1-5-21-1755879683-3641577184-3486455962 # @option opts [Time] :logon_time diff --git a/lib/msf/core/exploit/kerberos/client/tgs_request.rb b/lib/msf/core/exploit/kerberos/client/tgs_request.rb index 27670f4f10..e3e0c28bac 100644 --- a/lib/msf/core/exploit/kerberos/client/tgs_request.rb +++ b/lib/msf/core/exploit/kerberos/client/tgs_request.rb @@ -113,10 +113,10 @@ module Msf # Builds a KRB_AP_REQ message # - # @param opts [Hash{Symbol => }] - # @option opts [Fixnum] :pvno - # @option opts [Fixnum] :msg_type - # @option opts [Fixnum] :ap_req_options + # @param opts [Hash{Symbol => }] + # @option opts [Integer] :pvno + # @option opts [Integer] :msg_type + # @option opts [Integer] :ap_req_options # @option opts [Rex::Proto::Kerberos::Model::Ticket] :ticket # @option opts [Rex::Proto::Kerberos::Model::EncryptedData] :authenticator # @option opts [Rex::Proto::Kerberos::Model::EncryptionKey] :session_key @@ -159,7 +159,7 @@ module Msf # @option opts [Rex::Proto::Kerberos::Model::PrincipalName] :cname # @option opts [String] :realm # @option opts [Time] :ctime - # @option opts [Fixnum] :cusec + # @option opts [Integer] :cusec # @option opts [Rex::Proto::Kerberos::Model::Checksum] :checksum # @option opts [Rex::Proto::Kerberos::Model::EncryptionKey] :subkey # @return [Rex::Proto::Kerberos::Model::Authenticator] @@ -190,8 +190,8 @@ module Msf # Builds an encryption key to protect the data sent in the TGS request. # - # @param opts [Hash{Symbol => }] - # @option opts [Fixnum] :subkey_type + # @param opts [Hash{Symbol => }] + # @option opts [Integer] :subkey_type # @option opts [String] :subkey_value # @return [Rex::Proto::Kerberos::Model::EncryptionKey] # @see Rex::Proto::Kerberos::Model::EncryptionKey @@ -210,13 +210,13 @@ module Msf # Builds a kerberos TGS request body # - # @param opts [Hash{Symbol => }] - # @option opts [Fixnum] :options + # @param opts [Hash{Symbol => }] + # @option opts [Integer] :options # @option opts [Time] :from # @option opts [Time] :till # @option opts [Time] :rtime - # @option opts [Fixnum] :nonce - # @option opts [Fixnum] :etype + # @option opts [Integer] :nonce + # @option opts [Integer] :etype # @option opts [Rex::Proto::Kerberos::Model::PrincipalName] :cname # @option opts [String] :realm # @option opts [Rex::Proto::Kerberos::Model::PrincipalName] :sname @@ -254,7 +254,7 @@ module Msf # Builds a Kerberos TGS Request body checksum # - # @param opts [Hash{Symbol => }] + # @param opts [Hash{Symbol => }] # @option opts [Rex::Proto::Kerberos::Model::KdcRequestBody] :body # @return [Rex::Proto::Kerberos::Model::Checksum] # @see #build_tgs_request_body diff --git a/lib/msf/core/exploit/oracle.rb b/lib/msf/core/exploit/oracle.rb index 8fea54f3d1..90278e3e07 100644 --- a/lib/msf/core/exploit/oracle.rb +++ b/lib/msf/core/exploit/oracle.rb @@ -134,19 +134,19 @@ module Exploit::ORACLE when 2, :update_stmt connect.commit - # If we were successful our return should be a Fixnum with the number of rows updated + # If we were successful our return should be a Integer with the number of rows updated result = ['UPDATE Successful ' + sploit.row_count.to_s + ' Rows Updated'] return result # Delete Queries when 3, :delete_stmt connect.commit - # If we were successful our return should be a Fixnum with the number of rows updated + # If we were successful our return should be a Integer with the number of rows updated result = ['DELETE Successful ' + sploit.row_count.to_s + ' Rows Deleted'] return result # Insert Queries when 4, :insert_stmt connect.commit - # If we were successful our return should be a Fixnum with the number of rows updated + # If we were successful our return should be a Integer with the number of rows updated result = ['INSERT Successful ' + sploit.row_count.to_s + ' Rows Inserted'] return result # Create Queries diff --git a/lib/msf/core/exploit/postgres.rb b/lib/msf/core/exploit/postgres.rb index aa4856fe69..e7041f1b3c 100644 --- a/lib/msf/core/exploit/postgres.rb +++ b/lib/msf/core/exploit/postgres.rb @@ -48,7 +48,7 @@ module Exploit::Remote::Postgres # @return [String] IP address of the target def rhost; datastore['RHOST']; end # Return the datastore value of the same name - # @return [Fixnum] TCP port where the target service is running + # @return [Integer] TCP port where the target service is running def rport; datastore['RPORT']; end # Return the datastore value of the same name # @return [String] Username for authentication @@ -82,7 +82,7 @@ module Exploit::Remote::Postgres # @option opts [String] :username The username # @option opts [String] :username The username # @option opts [String] :server IP address or hostname of the target server - # @option opts [Fixnum] :port TCP port on :server + # @option opts [Integer] :port TCP port on :server # # @return [:error_database] if user/pass are correct but database is wrong # @return [:error_credentials] if user/pass are wrong diff --git a/lib/msf/core/exploit/smb/server/share.rb b/lib/msf/core/exploit/smb/server/share.rb index df5f43aca6..e45e203a2a 100644 --- a/lib/msf/core/exploit/smb/server/share.rb +++ b/lib/msf/core/exploit/smb/server/share.rb @@ -182,10 +182,10 @@ module Msf # @return [String] The file name of the provided UNC. attr_accessor :file_name # @!attribute hi - # @return [Fixnum] The high 4 bytes for the file 'created time'. + # @return [Integer] The high 4 bytes for the file 'created time'. attr_accessor :hi # @!attribute lo - # @return [Fixnum] The low 4 bytes for the file 'created time'. + # @return [Integer] The low 4 bytes for the file 'created time'. attr_accessor :lo # @!attribute file_contents # @return [String] The contents of the provided file @@ -271,10 +271,10 @@ module Msf # Main dispatcher function. Takes the client data and performs a case switch # on the command (e.g. Negotiate, Session Setup, Read file, etc.) # - # @param cmd [Fixnum] The SMB Command requested. + # @param cmd [Integer] The SMB Command requested. # @param c [Socket] The client to answer. # @param buff [String] The data including the client request. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_dispatch(cmd, c, buff) smb = @state[c] diff --git a/lib/msf/core/exploit/smb/server/share/command/close.rb b/lib/msf/core/exploit/smb/server/share/command/close.rb index a20aa12b32..77ab3a16b3 100644 --- a/lib/msf/core/exploit/smb/server/share/command/close.rb +++ b/lib/msf/core/exploit/smb/server/share/command/close.rb @@ -11,7 +11,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param buff [String] The data including the client request. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_close(c, buff) send_close_res(c) end @@ -19,7 +19,7 @@ module Msf # Builds and sends an SMB_COM_CLOSE response. # # @param c [Socket] The client to answer. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def send_close_res(c) pkt = CONST::SMB_CLOSE_RES_PKT.make_struct smb_set_defaults(c, pkt) diff --git a/lib/msf/core/exploit/smb/server/share/command/negotiate.rb b/lib/msf/core/exploit/smb/server/share/command/negotiate.rb index 8af877439c..0ed0d954f7 100644 --- a/lib/msf/core/exploit/smb/server/share/command/negotiate.rb +++ b/lib/msf/core/exploit/smb/server/share/command/negotiate.rb @@ -11,7 +11,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param buff [String] The data including the client request. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_negotiate(c, buff) pkt = CONST::SMB_NEG_PKT.make_struct pkt.from_s(buff) @@ -36,18 +36,18 @@ module Msf # Builds and sends an SMB_COM_CLOSE response. # # @param c [Socket] The client to answer. - # @param opts [Hash{Symbol => }] Response custom values. - # @option opts [Fixnum] :dialect The index of the dialect selected by the server from the request. - # @option opts [Fixnum] :security_mode Security modes supported or required by the server. - # @option opts [Fixnum] :max_mpx The maximum number of outstanding SMB operations that the server supports. - # @option opts [Fixnum] :max_vcs The maximum number of virtual circuits between the client and the server. - # @option opts [Fixnum] :max_buff Largest SMB message that the server can handle. - # @option opts [Fixnum] :max_raw Max size for SMB_COM_WRITE_RAW requests and SMB_COM_READ_RAW responses. - # @option opts [Fixnum] :server_time_zone The server's time zone. - # @option opts [Fixnum] :capabilities The server capability indicators. - # @option opts [Fixnum] :key_length The challenge length. + # @param opts [Hash{Symbol => }] Response custom values. + # @option opts [Integer] :dialect The index of the dialect selected by the server from the request. + # @option opts [Integer] :security_mode Security modes supported or required by the server. + # @option opts [Integer] :max_mpx The maximum number of outstanding SMB operations that the server supports. + # @option opts [Integer] :max_vcs The maximum number of virtual circuits between the client and the server. + # @option opts [Integer] :max_buff Largest SMB message that the server can handle. + # @option opts [Integer] :max_raw Max size for SMB_COM_WRITE_RAW requests and SMB_COM_READ_RAW responses. + # @option opts [Integer] :server_time_zone The server's time zone. + # @option opts [Integer] :capabilities The server capability indicators. + # @option opts [Integer] :key_length The challenge length. # @option opts [String] :key The challenge. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def send_negotitate_res(c, opts = {}) dialect = opts[:dialect] || 0 security_mode = opts[:security_mode] || 0 diff --git a/lib/msf/core/exploit/smb/server/share/command/nt_create_andx.rb b/lib/msf/core/exploit/smb/server/share/command/nt_create_andx.rb index f2ce208064..651fd23e0e 100644 --- a/lib/msf/core/exploit/smb/server/share/command/nt_create_andx.rb +++ b/lib/msf/core/exploit/smb/server/share/command/nt_create_andx.rb @@ -11,7 +11,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param buff [String] The data including the client request. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_nt_create_andx(c, buff) smb = @state[c] pkt = CONST::SMB_CREATE_PKT.make_struct @@ -69,13 +69,13 @@ module Msf # Builds and sends an SMB_COM_NT_CREATE_ANDX response. # # @param c [Socket] The client to answer. - # @param opts [Hash{Symbol => }] Response custom values. - # @option opts [Fixnum] :file_id A FID representing the file or directory created or opened. - # @option opts [Fixnum] :attributes The attributes that the server assigned to the file or directory. - # @option opts [Fixnum] :end_of_file_low The end of file offset value (4 bytes) - # @option opts [Fixnum] :is_directory Indicates if the FID represents a directory. - # @option opts [Fixnum] :alloc_low The number of bytes allocated to the file by the server. - # @return [Fixnum] The number of bytes returned to the client as response. + # @param opts [Hash{Symbol => }] Response custom values. + # @option opts [Integer] :file_id A FID representing the file or directory created or opened. + # @option opts [Integer] :attributes The attributes that the server assigned to the file or directory. + # @option opts [Integer] :end_of_file_low The end of file offset value (4 bytes) + # @option opts [Integer] :is_directory Indicates if the FID represents a directory. + # @option opts [Integer] :alloc_low The number of bytes allocated to the file by the server. + # @return [Integer] The number of bytes returned to the client as response. def send_nt_create_andx_res(c, opts = {}) file_id = opts[:file_id] || 0 attributes = opts[:attributes] || 0 diff --git a/lib/msf/core/exploit/smb/server/share/command/read_andx.rb b/lib/msf/core/exploit/smb/server/share/command/read_andx.rb index beea837c34..7c3b778346 100644 --- a/lib/msf/core/exploit/smb/server/share/command/read_andx.rb +++ b/lib/msf/core/exploit/smb/server/share/command/read_andx.rb @@ -11,7 +11,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param buff [String] The data including the client request. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_read_andx(c, buff) pkt = CONST::SMB_READ_PKT.make_struct pkt.from_s(buff) @@ -31,11 +31,11 @@ module Msf # Builds and sends an SMB_COM_NT_CREATE_ANDX response. # # @param c [Socket] The client to answer. - # @param opts [Hash{Symbol => }] Response custom values. - # @option opts [Fixnum] :data_len_low The length of the file data sent back. - # @option opts [Fixnum] :byte_count The length of the file data sent back. + # @param opts [Hash{Symbol => }] Response custom values. + # @option opts [Integer] :data_len_low The length of the file data sent back. + # @option opts [Integer] :byte_count The length of the file data sent back. # @option opts [String] :data The bytes read from the file. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def send_read_andx_res(c, opts = {}) data_len_low = opts[:data_len_low] || 0 byte_count = opts[:byte_count] || 0 diff --git a/lib/msf/core/exploit/smb/server/share/command/session_setup_andx.rb b/lib/msf/core/exploit/smb/server/share/command/session_setup_andx.rb index 8d36e29521..7eec9a8aca 100644 --- a/lib/msf/core/exploit/smb/server/share/command/session_setup_andx.rb +++ b/lib/msf/core/exploit/smb/server/share/command/session_setup_andx.rb @@ -11,7 +11,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param buff [String] The data including the client request. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_session_setup_andx(c, buff) tree_connect_response = CONST::SMB_TREE_CONN_ANDX_RES_PKT.make_struct tree_connect_response.v['WordCount'] = CONST::SMB_TREE_CONN_ANDX_WORD_COUNT @@ -39,15 +39,15 @@ module Msf # Builds and sends an SMB_COM_NT_CREATE_ANDX response. # # @param c [Socket] The client to answer. - # @param opts [Hash{Symbol => }] Response custom values. - # @option opts [Fixnum] :action SMB Configuration result. - # @option opts [Fixnum] :andx_offset The offset in bytes from the start of the SMB Header to the start + # @param opts [Hash{Symbol => }] Response custom values. + # @option opts [Integer] :action SMB Configuration result. + # @option opts [Integer] :andx_offset The offset in bytes from the start of the SMB Header to the start # of the WordCount field in the next SMBCommand. - # @option opts [Fixnum] :reserved Reserved field. - # @option opts [Fixnum] :andx The command code for the next SMB Command in the packet. + # @option opts [Integer] :reserved Reserved field. + # @option opts [Integer] :andx The command code for the next SMB Command in the packet. # @option opts [String] :data The SMB_Data for the SMB_COM_SESSION_SETUP_ANDX response. # @option opts [Rex::Struct2::CStruct] :andx_command The next SMB Command in the packet. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def send_session_setup_andx_res(c, opts = {}) action = opts[:action] || 0 andx_offset = opts[:andx_offset] || 0 diff --git a/lib/msf/core/exploit/smb/server/share/command/trans2.rb b/lib/msf/core/exploit/smb/server/share/command/trans2.rb index 5168c4cfe0..7f6ee9c5a7 100644 --- a/lib/msf/core/exploit/smb/server/share/command/trans2.rb +++ b/lib/msf/core/exploit/smb/server/share/command/trans2.rb @@ -14,7 +14,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param buff [String] The data including the client request. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_trans2(c, buff) smb = @state[c] pkt = CONST::SMB_TRANS2_PKT.make_struct @@ -44,7 +44,7 @@ module Msf # @param c [Socket] The client to answer. # @param parameters [Rex::Struct2::CStruct] The SMB_Parameters to include in the response. # @param data [Rex::Struct2::CStruct] The SMB_Data to include in the response. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def send_trans2_res(c, parameters, data) pkt = CONST::SMB_TRANS_RES_PKT.make_struct smb_set_defaults(c, pkt) diff --git a/lib/msf/core/exploit/smb/server/share/command/trans2/find_first2.rb b/lib/msf/core/exploit/smb/server/share/command/trans2/find_first2.rb index a4e61572b7..da56e4e80a 100644 --- a/lib/msf/core/exploit/smb/server/share/command/trans2/find_first2.rb +++ b/lib/msf/core/exploit/smb/server/share/command/trans2/find_first2.rb @@ -12,7 +12,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param buff [String] The data including the client request. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_trans2_find_first2(c, buff) smb = @state[c] diff --git a/lib/msf/core/exploit/smb/server/share/command/trans2/query_file_information.rb b/lib/msf/core/exploit/smb/server/share/command/trans2/query_file_information.rb index 9f8b460f53..f0a39b6635 100644 --- a/lib/msf/core/exploit/smb/server/share/command/trans2/query_file_information.rb +++ b/lib/msf/core/exploit/smb/server/share/command/trans2/query_file_information.rb @@ -13,7 +13,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param buff [String] The data including the client request. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_trans2_query_file_information(c, buff) smb = @state[c] diff --git a/lib/msf/core/exploit/smb/server/share/command/trans2/query_path_information.rb b/lib/msf/core/exploit/smb/server/share/command/trans2/query_path_information.rb index a6847e02aa..eb17e75f72 100644 --- a/lib/msf/core/exploit/smb/server/share/command/trans2/query_path_information.rb +++ b/lib/msf/core/exploit/smb/server/share/command/trans2/query_path_information.rb @@ -12,7 +12,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param buff [String] The data including the client request. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_trans2_query_path_information(c, buff) smb = @state[c] diff --git a/lib/msf/core/exploit/smb/server/share/information_level/find.rb b/lib/msf/core/exploit/smb/server/share/information_level/find.rb index bc939adc35..60df14af30 100644 --- a/lib/msf/core/exploit/smb/server/share/information_level/find.rb +++ b/lib/msf/core/exploit/smb/server/share/information_level/find.rb @@ -11,7 +11,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param path [String] The path which the client is requesting info from. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_find_file_both_directory_info(c, path) contents = get_file_contents(client: c) @@ -56,7 +56,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param path [String] The path which the client is requesting info from. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_find_file_names_info(c, path) if path && path.ends_with?(file_name.downcase) data = Rex::Text.to_unicode(file_name) @@ -76,7 +76,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param path [String] The path which the client is requesting info from. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_find_file_full_directory_info(c, path) contents = get_file_contents(client: c) @@ -120,15 +120,15 @@ module Msf # information level. # # @param c [Socket] The client to answer. - # @param opts [Hash{Symbol => }] Response custom values. - # @option opts [Fixnum] :search_count The number of entries returned by the search. - # @option opts [Fixnum] :end_of_search 0 if search continues or nonzero otherwise. - # @option opts [Fixnum] :ea_error_offset should be 0 for SMB_FIND_FILE_BOTH_DIRECTORY_INFO. - # @option opts [Fixnum] :end_of_file The byte offset to the end of the file. - # @option opts [Fixnum] :allocation_size The file allocation size in bytes. - # @option opts [Fixnum] :file_attributes The extended file attributes of the file. + # @param opts [Hash{Symbol => }] Response custom values. + # @option opts [Integer] :search_count The number of entries returned by the search. + # @option opts [Integer] :end_of_search 0 if search continues or nonzero otherwise. + # @option opts [Integer] :ea_error_offset should be 0 for SMB_FIND_FILE_BOTH_DIRECTORY_INFO. + # @option opts [Integer] :end_of_file The byte offset to the end of the file. + # @option opts [Integer] :allocation_size The file allocation size in bytes. + # @option opts [Integer] :file_attributes The extended file attributes of the file. # @option opts [String] :data The long name of the file. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def send_find_file_both_directory_info_res(c, opts = {}) data = opts[:data] || '' search_count = opts[:search_count] || 0 @@ -170,9 +170,9 @@ module Msf # Builds and sends an TRANS2_FIND_FIRST2 response with SMB_FIND_FILE_NAMES_INFO # information level. # @param c [Socket] The client to answer. - # @param opts [Hash{Symbol => }] Response custom values. + # @param opts [Hash{Symbol => }] Response custom values. # @option opts [String] :data The long name of the file. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def send_find_file_names_info_res(c, opts = {}) data = opts[:data] || '' @@ -198,15 +198,15 @@ module Msf # information level. # # @param c [Socket] The client to answer. - # @param opts [Hash{Symbol => }] Response custom values. - # @option opts [Fixnum] :search_count The number of entries returned by the search. - # @option opts [Fixnum] :end_of_search 0 if search continues or nonzero otherwise. - # @option opts [Fixnum] :ea_error_offset should be 0 for SMB_FIND_FILE_FULL_DIRECTORY_INFO. - # @option opts [Fixnum] :end_of_file The byte offset to the end of the file. - # @option opts [Fixnum] :allocation_size The file allocation size in bytes. - # @option opts [Fixnum] :file_attributes The extended file attributes of the file. + # @param opts [Hash{Symbol => }] Response custom values. + # @option opts [Integer] :search_count The number of entries returned by the search. + # @option opts [Integer] :end_of_search 0 if search continues or nonzero otherwise. + # @option opts [Integer] :ea_error_offset should be 0 for SMB_FIND_FILE_FULL_DIRECTORY_INFO. + # @option opts [Integer] :end_of_file The byte offset to the end of the file. + # @option opts [Integer] :allocation_size The file allocation size in bytes. + # @option opts [Integer] :file_attributes The extended file attributes of the file. # @option opts [String] :data The long name of the file. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def send_find_full_directory_info_res(c, opts = {}) data = opts[:data] || '' search_count = opts[:search_count] || 0 diff --git a/lib/msf/core/exploit/smb/server/share/information_level/query.rb b/lib/msf/core/exploit/smb/server/share/information_level/query.rb index b0110066af..3cab1636fc 100644 --- a/lib/msf/core/exploit/smb/server/share/information_level/query.rb +++ b/lib/msf/core/exploit/smb/server/share/information_level/query.rb @@ -10,8 +10,8 @@ module Msf # Information Level. # # @param c [Socket] The client sending the request. - # @param fid [Fixnum] The file identifier which the client is requesting info from. - # @return [Fixnum] The number of bytes returned to the client as response. + # @param fid [Integer] The file identifier which the client is requesting info from. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_trans_query_file_info_basic(c, fid) smb = @state[c] @@ -30,8 +30,8 @@ module Msf # Information Level. # # @param c [Socket] The client sending the request. - # @param fid [Fixnum] The file identifier which the client is requesting info from. - # @return [Fixnum] The number of bytes returned to the client as response. + # @param fid [Integer] The file identifier which the client is requesting info from. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_trans_query_file_info_standard(c, fid) contents = get_file_contents(client: c) @@ -49,7 +49,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param path [String] The path which the client is requesting info from. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_trans_query_path_info_basic(c, path) if path && path.ends_with?(file_name.downcase) attrib = CONST::SMB_EXT_FILE_ATTR_NORMAL @@ -69,7 +69,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param path [String] The path which the client is requesting info from. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_trans_query_path_info_standard(c, path) contents = get_file_contents(client: c) @@ -97,7 +97,7 @@ module Msf # # @param c [Socket] The client sending the request. # @param path [String] The path which the client is requesting info from. - # @return [Fixnum] The number of bytes returned to the client as response. + # @return [Integer] The number of bytes returned to the client as response. def smb_cmd_trans_query_path_info_network(c, path) contents = get_file_contents(client: c) @@ -122,9 +122,9 @@ module Msf # information level. # # @param c [Socket] The client to answer. - # @param opts [Hash{Symbol => }] Response custom values. - # @option opts [Fixnum] :file_attributes The extended file attributes of the file. - # @return [Fixnum] The number of bytes returned to the client as response. + # @param opts [Hash{Symbol => }] Response custom values. + # @option opts [Integer] :file_attributes The extended file attributes of the file. + # @return [Integer] The number of bytes returned to the client as response. def send_info_basic_res(c, opts = {}) file_attributes = opts[:file_attributes] || 0 @@ -149,13 +149,13 @@ module Msf # information level. # # @param c [Socket] The client to answer. - # @param opts [Hash{Symbol => }] Response custom values. - # @option opts [Fixnum] :allocation_size The number of bytes that are allocated to the file. - # @option opts [Fixnum] :number_links The number of hard links to the file. - # @option opts [Fixnum] :delete_pending Indicates whether there is a delete action pending for the file. - # @option opts [Fixnum] :directory Indicates whether the file is a directory. - # @option opts [Fixnum] :end_of_file The offset from the start to the end of the file. - # @return [Fixnum] The number of bytes returned to the client as response. + # @param opts [Hash{Symbol => }] Response custom values. + # @option opts [Integer] :allocation_size The number of bytes that are allocated to the file. + # @option opts [Integer] :number_links The number of hard links to the file. + # @option opts [Integer] :delete_pending Indicates whether there is a delete action pending for the file. + # @option opts [Integer] :directory Indicates whether the file is a directory. + # @option opts [Integer] :end_of_file The offset from the start to the end of the file. + # @return [Integer] The number of bytes returned to the client as response. def send_info_standard_res(c, opts = {}) allocation_size = opts[:allocation_size] || 0 number_links = opts[:number_links] || 0 @@ -180,11 +180,11 @@ module Msf # information level. # # @param c [Socket] The client to answer. - # @param opts [Hash{Symbol => }] Response custom values. - # @option opts [Fixnum] :allocation_size The number of bytes that are allocated to the file. - # @option opts [Fixnum] :end_of_file The offset from the start to the end of the file. - # @option opts [Fixnum] :file_attributes The file attributes. - # @return [Fixnum] The number of bytes returned to the client as response. + # @param opts [Hash{Symbol => }] Response custom values. + # @option opts [Integer] :allocation_size The number of bytes that are allocated to the file. + # @option opts [Integer] :end_of_file The offset from the start to the end of the file. + # @option opts [Integer] :file_attributes The file attributes. + # @return [Integer] The number of bytes returned to the client as response. def send_info_network_res(c, opts= {}) allocation_size = opts[:allocation_size] || 0 end_of_file = opts[:end_of_file] || 0 diff --git a/lib/msf/core/module/ui/message.rb b/lib/msf/core/module/ui/message.rb index 1eb480b2a2..01d2893afd 100644 --- a/lib/msf/core/module/ui/message.rb +++ b/lib/msf/core/module/ui/message.rb @@ -22,7 +22,7 @@ module Msf::Module::UI::Message xn ||= datastore['ExploitNumber'] xn ||= framework.datastore['ExploitNumber'] - if xn.is_a?(Fixnum) + if xn.is_a?(Integer) prefix << "[%04d] " % xn end diff --git a/lib/msf/core/payload/linux/bind_tcp.rb b/lib/msf/core/payload/linux/bind_tcp.rb index 57fe553c85..cc7fbc7b02 100644 --- a/lib/msf/core/payload/linux/bind_tcp.rb +++ b/lib/msf/core/payload/linux/bind_tcp.rb @@ -80,7 +80,7 @@ module Payload::Linux::BindTcp # # Generate an assembly stub with the configured feature set and options. # - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [Bool] :reliable Whether or not to enable error handling code # def asm_bind_tcp(opts={}) diff --git a/lib/msf/core/payload/linux/reverse_tcp.rb b/lib/msf/core/payload/linux/reverse_tcp.rb index 44e0d5a66e..89e37a8c44 100644 --- a/lib/msf/core/payload/linux/reverse_tcp.rb +++ b/lib/msf/core/payload/linux/reverse_tcp.rb @@ -79,7 +79,7 @@ module Payload::Linux::ReverseTcp # # Generate an assembly stub with the configured feature set and options. # - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :host The host IP to connect to # @option opts [Bool] :reliable Whether or not to enable error handling code # diff --git a/lib/msf/core/payload/uuid.rb b/lib/msf/core/payload/uuid.rb index 749b98c5f9..6b439989ad 100644 --- a/lib/msf/core/payload/uuid.rb +++ b/lib/msf/core/payload/uuid.rb @@ -94,8 +94,8 @@ class Msf::Payload::UUID # @option opts [String] :arch The hardware architecture for this payload # @option opts [String] :platform The operating system platform for this payload # @option opts [String] :timestamp The timestamp in UTC Unix epoch format - # @option opts [Fixnum] :xor1 An optional 8-bit XOR ID for obfuscation - # @option opts [Fixnum] :xor2 An optional 8-bit XOR ID for obfuscation + # @option opts [Integer] :xor1 An optional 8-bit XOR ID for obfuscation + # @option opts [Integer] :xor2 An optional 8-bit XOR ID for obfuscation # @return [String] The encoded payoad UUID as a binary string # def self.generate_raw(opts={}) @@ -195,7 +195,7 @@ class Msf::Payload::UUID # Look up the numeric platform ID given a string or PlatformList as input # # @param platform [String] The name of the platform to lookup - # @return [Fixnum] The integer value of this platform + # @return [Integer] The integer value of this platform # def self.find_platform_id(platform) # Handle a PlatformList input by grabbing the first entry @@ -218,7 +218,7 @@ class Msf::Payload::UUID # Look up the numeric architecture ID given a string as input # # @param name [String] The name of the architecture to lookup - # @return [Fixnum] The integer value of this architecture + # @return [Integer] The integer value of this architecture # def self.find_architecture_id(name) name = name.first if name.kind_of? ::Array diff --git a/lib/msf/core/payload/uuid/options.rb b/lib/msf/core/payload/uuid/options.rb index f9e350d4f2..07eadfdeec 100644 --- a/lib/msf/core/payload/uuid/options.rb +++ b/lib/msf/core/payload/uuid/options.rb @@ -27,7 +27,7 @@ module Msf::Payload::UUID::Options # the desired length can accommodate it. # # @param mode [Symbol] The type of checksum to generate (:connect, :init_native, :init_python, :init_java) - # @param len [Fixnum] The length of the URI not including the leading slash, optionally nil for random + # @param len [Integer] The length of the URI not including the leading slash, optionally nil for random # @return [String] A URI with a leading slash that hashes to the checksum, with an optional UUID # def generate_uri_uuid_mode(mode, len = nil, uuid: nil) diff --git a/lib/msf/core/payload/windows/bind_tcp.rb b/lib/msf/core/payload/windows/bind_tcp.rb index 3b13778f3b..63b9a5d651 100644 --- a/lib/msf/core/payload/windows/bind_tcp.rb +++ b/lib/msf/core/payload/windows/bind_tcp.rb @@ -101,7 +101,7 @@ module Payload::Windows::BindTcp # # Generate an assembly stub with the configured feature set and options. # - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh # @option opts [Bool] :reliable Whether or not to enable error handling code # diff --git a/lib/msf/core/payload/windows/reverse_http.rb b/lib/msf/core/payload/windows/reverse_http.rb index 6f679cb343..be0bb09316 100644 --- a/lib/msf/core/payload/windows/reverse_http.rb +++ b/lib/msf/core/payload/windows/reverse_http.rb @@ -145,14 +145,14 @@ module Payload::Windows::ReverseHttp # @option opts [Bool] :ssl Whether or not to enable SSL # @option opts [String] :url The URI to request during staging # @option opts [String] :host The host to connect to - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh # @option opts [String] :proxy_host The optional proxy server host to use - # @option opts [Fixnum] :proxy_port The optional proxy server port to use + # @option opts [Integer] :proxy_port The optional proxy server port to use # @option opts [String] :proxy_type The optional proxy server type, one of HTTP or SOCKS # @option opts [String] :proxy_user The optional proxy server username # @option opts [String] :proxy_pass The optional proxy server password - # @option opts [Fixnum] :retry_count The number of times to retry a failed request before giving up + # @option opts [Integer] :retry_count The number of times to retry a failed request before giving up # def asm_reverse_http(opts={}) diff --git a/lib/msf/core/payload/windows/reverse_tcp.rb b/lib/msf/core/payload/windows/reverse_tcp.rb index 8eab10f6ea..532e6574b2 100644 --- a/lib/msf/core/payload/windows/reverse_tcp.rb +++ b/lib/msf/core/payload/windows/reverse_tcp.rb @@ -93,9 +93,9 @@ module Payload::Windows::ReverseTcp # # Generate an assembly stub with the configured feature set and options. # - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh - # @option opts [Fixnum] :retry_count Number of retry attempts + # @option opts [Integer] :retry_count Number of retry attempts # def asm_reverse_tcp(opts={}) diff --git a/lib/msf/core/payload/windows/reverse_tcp_dns.rb b/lib/msf/core/payload/windows/reverse_tcp_dns.rb index c665428374..32b8f259a9 100644 --- a/lib/msf/core/payload/windows/reverse_tcp_dns.rb +++ b/lib/msf/core/payload/windows/reverse_tcp_dns.rb @@ -65,9 +65,9 @@ module Payload::Windows::ReverseTcpDns # # Generate an assembly stub with the configured feature set and options. # - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh - # @option opts [Fixnum] :retry_count Number of retry attempts + # @option opts [Integer] :retry_count Number of retry attempts # def asm_reverse_tcp_dns(opts={}) diff --git a/lib/msf/core/payload/windows/reverse_tcp_rc4.rb b/lib/msf/core/payload/windows/reverse_tcp_rc4.rb index edbf6a1f5b..23d431b56f 100644 --- a/lib/msf/core/payload/windows/reverse_tcp_rc4.rb +++ b/lib/msf/core/payload/windows/reverse_tcp_rc4.rb @@ -61,7 +61,7 @@ module Payload::Windows::ReverseTcpRc4 # # Generate an assembly stub with the configured feature set and options. # - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh # @option opts [Bool] :reliable Whether or not to enable error handling code # diff --git a/lib/msf/core/payload/windows/reverse_winhttp.rb b/lib/msf/core/payload/windows/reverse_winhttp.rb index 9075144fa0..c6f1eb838b 100644 --- a/lib/msf/core/payload/windows/reverse_winhttp.rb +++ b/lib/msf/core/payload/windows/reverse_winhttp.rb @@ -115,10 +115,10 @@ module Payload::Windows::ReverseWinHttp # @option opts [Bool] :ssl Whether or not to enable SSL # @option opts [String] :uri The URI to request during staging # @option opts [String] :host The host to connect to - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :verify_cert_hash A 20-byte raw SHA-1 hash of the certificate to verify, or nil # @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh - # @option opts [Fixnum] :retry_count The number of times to retry a failed request before giving up + # @option opts [Integer] :retry_count The number of times to retry a failed request before giving up # def asm_reverse_winhttp(opts={}) diff --git a/lib/msf/core/payload/windows/x64/bind_tcp.rb b/lib/msf/core/payload/windows/x64/bind_tcp.rb index 36ef3ac908..46f7c0b744 100644 --- a/lib/msf/core/payload/windows/x64/bind_tcp.rb +++ b/lib/msf/core/payload/windows/x64/bind_tcp.rb @@ -100,7 +100,7 @@ module Payload::Windows::BindTcp_x64 # # Generate an assembly stub with the configured feature set and options. # - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh # @option opts [Bool] :reliable Whether or not to enable error handling code # diff --git a/lib/msf/core/payload/windows/x64/reverse_http.rb b/lib/msf/core/payload/windows/x64/reverse_http.rb index 4b301317fc..a35fbefc7a 100644 --- a/lib/msf/core/payload/windows/x64/reverse_http.rb +++ b/lib/msf/core/payload/windows/x64/reverse_http.rb @@ -144,14 +144,14 @@ module Payload::Windows::ReverseHttp_x64 # @option opts [Bool] :ssl Whether or not to enable SSL # @option opts [String] :url The URI to request during staging # @option opts [String] :host The host to connect to - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh # @option opts [String] :proxy_host The optional proxy server host to use - # @option opts [Fixnum] :proxy_port The optional proxy server port to use + # @option opts [Integer] :proxy_port The optional proxy server port to use # @option opts [String] :proxy_type The optional proxy server type, one of HTTP or SOCKS # @option opts [String] :proxy_user The optional proxy server username # @option opts [String] :proxy_pass The optional proxy server password - # @option opts [Fixnum] :retry_count The number of times to retry a failed request before giving up + # @option opts [Integer] :retry_count The number of times to retry a failed request before giving up # def asm_reverse_http(opts={}) diff --git a/lib/msf/core/payload/windows/x64/reverse_tcp.rb b/lib/msf/core/payload/windows/x64/reverse_tcp.rb index 04f7957f52..3684be93af 100644 --- a/lib/msf/core/payload/windows/x64/reverse_tcp.rb +++ b/lib/msf/core/payload/windows/x64/reverse_tcp.rb @@ -99,7 +99,7 @@ module Payload::Windows::ReverseTcp_x64 # # Generate an assembly stub with the configured feature set and options. # - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh # @option opts [Bool] :reliable Whether or not to enable error handling code # diff --git a/lib/msf/core/payload/windows/x64/reverse_winhttp.rb b/lib/msf/core/payload/windows/x64/reverse_winhttp.rb index add108d61f..7ba6de3b35 100644 --- a/lib/msf/core/payload/windows/x64/reverse_winhttp.rb +++ b/lib/msf/core/payload/windows/x64/reverse_winhttp.rb @@ -117,10 +117,10 @@ module Payload::Windows::ReverseWinHttp_x64 # @option opts [Bool] :ssl Whether or not to enable SSL # @option opts [String] :uri The URI to request during staging # @option opts [String] :host The host to connect to - # @option opts [Fixnum] :port The port to connect to + # @option opts [Integer] :port The port to connect to # @option opts [String] :verify_cert_hash A 20-byte raw SHA-1 hash of the certificate to verify, or nil # @option opts [String] :exitfunk The exit method to use if there is an error, one of process, thread, or seh - # @option opts [Fixnum] :retry_count The number of times to retry a failed request before giving up + # @option opts [Integer] :retry_count The number of times to retry a failed request before giving up # def asm_reverse_winhttp(opts={}) diff --git a/lib/msf/core/payload_generator.rb b/lib/msf/core/payload_generator.rb index cc486fd7f6..e1d1d97d8f 100644 --- a/lib/msf/core/payload_generator.rb +++ b/lib/msf/core/payload_generator.rb @@ -51,13 +51,13 @@ module Msf # @return [Msf::Framework] The framework instance to use for generation attr_accessor :framework # @!attribute iterations - # @return [Fixnum] The number of iterations to run the encoder + # @return [Integer] The number of iterations to run the encoder attr_accessor :iterations # @!attribute keep # @return [Boolean] Whether or not to preserve the original functionality of the template attr_accessor :keep # @!attribute nops - # @return [Fixnum] The size in bytes of NOP sled to prepend the payload with + # @return [Integer] The size in bytes of NOP sled to prepend the payload with attr_accessor :nops # @!attribute payload # @return [String] The refname of the payload to generate @@ -69,10 +69,10 @@ module Msf # @return [Boolean] Whether or not to find the smallest possible output attr_accessor :smallest # @!attribute space - # @return [Fixnum] The maximum size in bytes of the payload + # @return [Integer] The maximum size in bytes of the payload attr_accessor :space # @!attribute encoder_space - # @return [Fixnum] The maximum size in bytes of the encoded payload + # @return [Integer] The maximum size in bytes of the encoded payload attr_accessor :encoder_space # @!attribute stdin # @return [String] The raw bytes of a payload taken from STDIN @@ -89,14 +89,14 @@ module Msf # @option opts [String] :payload (see #payload) # @option opts [String] :format (see #format) # @option opts [String] :encoder (see #encoder) - # @option opts [Fixnum] :iterations (see #iterations) + # @option opts [Integer] :iterations (see #iterations) # @option opts [String] :arch (see #arch) # @option opts [String] :platform (see #platform) # @option opts [String] :badchars (see #badchars) # @option opts [String] :template (see #template) - # @option opts [Fixnum] :space (see #space) - # @option opts [Fixnum] :encoder_space (see #encoder_space) - # @option opts [Fixnum] :nops (see #nops) + # @option opts [Integer] :space (see #space) + # @option opts [Integer] :encoder_space (see #encoder_space) + # @option opts [Integer] :nops (see #nops) # @option opts [String] :add_code (see #add_code) # @option opts [Boolean] :keep (see #keep) # @option opts [Hash] :datastore (see #datastore) diff --git a/lib/msf/core/post.rb b/lib/msf/core/post.rb index e4695a2b74..69e5d586fd 100644 --- a/lib/msf/core/post.rb +++ b/lib/msf/core/post.rb @@ -57,7 +57,7 @@ class Msf::Post < Msf::Module # is currently running against. # # @return [NilClass] if there is no database record for the session - # @return [Fixnum] if there is a database record to get the id for + # @return [Integer] if there is a database record to get the id for def session_db_id if session.db_record session.db_record.id diff --git a/lib/msf/core/post/file.rb b/lib/msf/core/post/file.rb index 78a06bceec..7e11bc3c15 100644 --- a/lib/msf/core/post/file.rb +++ b/lib/msf/core/post/file.rb @@ -533,7 +533,7 @@ protected # # Calculate the maximum line length for a unix shell. # - # @return [Fixnum] + # @return [Integer] def _unix_max_line_length # Based on autoconf's arg_max calculator, see # http://www.in-ulm.de/~mascheck/various/argmax/autoconf_check.html diff --git a/lib/msf/core/post/windows/accounts.rb b/lib/msf/core/post/windows/accounts.rb index 9fb14b1132..72dc1bcc11 100644 --- a/lib/msf/core/post/windows/accounts.rb +++ b/lib/msf/core/post/windows/accounts.rb @@ -268,7 +268,7 @@ module Accounts # Gets an impersonation token from the primary token. # - # @return [Fixnum] the impersonate token handle identifier if success, nil if + # @return [Integer] the impersonate token handle identifier if success, nil if # fails def get_imperstoken adv = session.railgun.advapi32 @@ -291,7 +291,7 @@ module Accounts # to an access token. # # @param [String] dir the directory path - # @param [Fixnum] token the access token + # @param [Integer] token the access token # @return [String, nil] a String describing the permissions or nil def check_dir_perms(dir, token) adv = session.railgun.advapi32 diff --git a/lib/msf/core/post/windows/ldap.rb b/lib/msf/core/post/windows/ldap.rb index deee72948c..bcb756e232 100644 --- a/lib/msf/core/post/windows/ldap.rb +++ b/lib/msf/core/post/windows/ldap.rb @@ -108,7 +108,7 @@ module LDAP # Performs an ldap query # # @param filter [String] LDAP search filter - # @param max_results [Fixnum] Maximum results + # @param max_results [Integer] Maximum results # @param fields [Array] Attributes to retrieve # @param domain [String] Optional domain or distinguished name # @return [Hash] Entries found @@ -158,9 +158,9 @@ module LDAP # Performs a query on the LDAP session # # @param session_handle [Handle] LDAP Session Handle - # @param base [Fixnum] Pointer to string that contains distinguished + # @param base [Integer] Pointer to string that contains distinguished # name of entry to start the search - # @param scope [Fixnum] Search Scope + # @param scope [Integer] Search Scope # @param filter [String] Search Filter # @param fields [Array] Attributes to retrieve # @return [Hash] Entries found @@ -245,7 +245,7 @@ module LDAP # Gets the LDAP Entry # - # @param pEntry [Fixnum] Pointer to the Entry + # @param pEntry [Integer] Pointer to the Entry # @return [Array] Entry data structure def get_entry(pEntry) return client.railgun.memread(pEntry,41).unpack('VVVVVVVVVvCCC') @@ -328,7 +328,7 @@ module LDAP end # Binds to the default LDAP Server - # @param size_limit [Fixnum] Maximum number of results to return in a query + # @param size_limit [Integer] Maximum number of results to return in a query # @param domain [String] Optional domain or distinguished name # @return LDAP session handle def bind_default_ldap_server(size_limit, domain=nil) diff --git a/lib/msf/core/post/windows/process.rb b/lib/msf/core/post/windows/process.rb index 53a4e1e3f3..81ef57c582 100644 --- a/lib/msf/core/post/windows/process.rb +++ b/lib/msf/core/post/windows/process.rb @@ -10,8 +10,8 @@ module Process # Injects shellcode to a process, and executes it. # # @param shellcode [String] The shellcode to execute - # @param base_addr [Fixnum] The base address to allocate memory - # @param pid [Fixnum] The process ID to inject to + # @param base_addr [Integer] The base address to allocate memory + # @param pid [Integer] The process ID to inject to # # @return [Boolean] True if successful, otherwise false # diff --git a/lib/msf/core/post/windows/reflective_dll_injection.rb b/lib/msf/core/post/windows/reflective_dll_injection.rb index 5f99480734..39f41efd1f 100644 --- a/lib/msf/core/post/windows/reflective_dll_injection.rb +++ b/lib/msf/core/post/windows/reflective_dll_injection.rb @@ -21,7 +21,7 @@ module Msf::Post::Windows::ReflectiveDLLInjection # The process to inject the shellcode into. # @param shellcode [String] The shellcode to inject. # - # @return [Fixnum] Address of the shellcode in the target process's + # @return [Integer] Address of the shellcode in the target process's # memory. def inject_into_process(process, shellcode) shellcode_size = shellcode.length diff --git a/lib/msf/core/post/windows/services.rb b/lib/msf/core/post/windows/services.rb index 1d850c9826..6459c47479 100644 --- a/lib/msf/core/post/windows/services.rb +++ b/lib/msf/core/post/windows/services.rb @@ -55,11 +55,11 @@ module Services # @param opts [Hash] # @option opts [String] :host (nil) The host on which to open the # service manager. May be a hostname or IP address. - # @option opts [Fixnum] :access (0xF003F) Bitwise-or of the + # @option opts [Integer] :access (0xF003F) Bitwise-or of the # SC_MANAGER_* constants (see # {http://msdn.microsoft.com/en-us/library/windows/desktop/ms685981(v=vs.85).aspx}) # - # @return [Fixnum] Opaque Windows handle SC_HANDLE as returned by + # @return [Integer] Opaque Windows handle SC_HANDLE as returned by # OpenSCManagerA() # @yield [manager] Gives the block a manager handle as returned by # advapi32.dll!OpenSCManagerA. When the block returns, the handle @@ -105,7 +105,7 @@ module Services # Open the service with advapi32.dll!OpenServiceA on the # target manager # - # @return [Fixnum] Opaque Windows handle SC_HANDLE as returned by + # @return [Integer] Opaque Windows handle SC_HANDLE as returned by # OpenServiceA() # @yield [manager] Gives the block a service handle as returned by # advapi32.dll!OpenServiceA. When the block returns, the handle @@ -376,7 +376,7 @@ module Services # @param server [String,nil] A hostname or IP address. Default is the # remote localhost # - # @return [Fixnum] 0 if service started successfully, 1 if it failed + # @return [Integer] 0 if service started successfully, 1 if it failed # because the service is already running, 2 if it is disabled # # @raise [RuntimeError] if OpenServiceA failed @@ -395,7 +395,7 @@ module Services # Stop a service. # # @param (see #service_start) - # @return [Fixnum] 0 if service stopped successfully, 1 if it failed + # @return [Integer] 0 if service stopped successfully, 1 if it failed # because the service is already stopped or disabled, 2 if it # cannot be stopped for some other reason. # diff --git a/lib/msf/core/post_mixin.rb b/lib/msf/core/post_mixin.rb index da62c4f0ba..607a09d561 100644 --- a/lib/msf/core/post_mixin.rb +++ b/lib/msf/core/post_mixin.rb @@ -131,7 +131,7 @@ module Msf::PostMixin # # Checks the session's type against this module's # module_info["SessionTypes"] as well as examining platform - # compatibility. +sess_or_sid+ can be a Session object, Fixnum, or + # compatibility. +sess_or_sid+ can be a Session object, Integer, or # String. In the latter cases it should be a key in # +framework.sessions+. # @@ -139,14 +139,14 @@ module Msf::PostMixin # value from this method does not guarantee the module will work # with the session. # - # @param sess_or_sid [Msf::Session,Fixnum,String] + # @param sess_or_sid [Msf::Session,Integer,String] # A session or session ID to compare against this module for # compatibility. # def session_compatible?(sess_or_sid) # Normalize the argument to an actual Session case sess_or_sid - when ::Fixnum, ::String + when ::Integer, ::String s = framework.sessions[sess_or_sid.to_i] when ::Msf::Session s = sess_or_sid diff --git a/lib/msf/core/reflective_dll_loader.rb b/lib/msf/core/reflective_dll_loader.rb index 68a5836f01..ac72d3727f 100644 --- a/lib/msf/core/reflective_dll_loader.rb +++ b/lib/msf/core/reflective_dll_loader.rb @@ -29,9 +29,9 @@ module Msf::ReflectiveDLLLoader # Load a reflectively-injectable DLL from an string and find the offset # to the ReflectiveLoader function inside the DLL. # - # @param [Fixnum] dll_data the DLL to load. + # @param [Integer] dll_data the DLL to load. # - # @return [Fixnum] offset to the +ReflectiveLoader+ function within the DLL. + # @return [Integer] offset to the +ReflectiveLoader+ function within the DLL. def load_rdi_dll_from_data(dll_data) offset = parse_pe(dll_data) diff --git a/lib/msf/core/rpc/v10/constants.rb b/lib/msf/core/rpc/v10/constants.rb index bdb8375628..9417fddf12 100644 --- a/lib/msf/core/rpc/v10/constants.rb +++ b/lib/msf/core/rpc/v10/constants.rb @@ -10,7 +10,7 @@ class Exception < RuntimeError # Initializes Exception. # - # @param [Fixnum] code An error code. + # @param [Integer] code An error code. # @param [String] message An error message. # @return [void] def initialize(code, message) @@ -25,7 +25,7 @@ class ServerException < RuntimeError # Initializes ServerException. # - # @param [Fixnum] code An error code. + # @param [Integer] code An error code. # @param [String] error_message An error message. # @param [Exception] error_class An error class. # @param [Array] error_backtrace A backtrace of the error. diff --git a/lib/msf/core/rpc/v10/rpc_base.rb b/lib/msf/core/rpc/v10/rpc_base.rb index a9c5be4369..4781e7cbf3 100644 --- a/lib/msf/core/rpc/v10/rpc_base.rb +++ b/lib/msf/core/rpc/v10/rpc_base.rb @@ -17,7 +17,7 @@ class RPC_Base # Raises an Msf::RPC Exception. # - # @param [Fixnum] code The error code to raise. + # @param [Integer] code The error code to raise. # @param [String] message The error message. # @raise [Msf::RPC::Exception] # @return [void] diff --git a/lib/msf/core/rpc/v10/rpc_console.rb b/lib/msf/core/rpc/v10/rpc_console.rb index 720ca1ecfe..1420ce6f7e 100644 --- a/lib/msf/core/rpc/v10/rpc_console.rb +++ b/lib/msf/core/rpc/v10/rpc_console.rb @@ -19,7 +19,7 @@ class RPC_Console < RPC_Base # # @param [Hash] opts See Msf::Ui::Web::Driver#create_console # @return [Hash] Information about the new console. It contains the following keys: - # * 'id' [Fixnum] The console's ID. + # * 'id' [Integer] The console's ID. # * 'prompt' [String] The framework prompt (example: 'msf > ') # * 'busy' [TrueClass] The console's busy state, or # * 'busy' [FalseClass] The console's busy state. @@ -39,7 +39,7 @@ class RPC_Console < RPC_Base # # @return [Hash] Console information. # * 'consoles' [Array] consoles, each element is a hash that includes: - # * 'id' [Fixnum] The console's ID + # * 'id' [Integer] The console's ID # * 'prompt' [String] The framework prompt (example: 'msf > ') # * 'busy' [TrueClass] The console's busy state, or # * 'busy' [FalseClass] The console's busy state. @@ -60,7 +60,7 @@ class RPC_Console < RPC_Base # Deletes a framework console instance. # - # @param [Fixnum] cid Framework console ID. + # @param [Integer] cid Framework console ID. # @return [Hash] A result indicating whether the action was successful or not. # It contains the following key: # * 'result' [String] Either 'success' or 'failure'. @@ -76,7 +76,7 @@ class RPC_Console < RPC_Base # Returns the framework console output in raw form. # - # @param [Fixnum] cid Framework console ID. + # @param [Integer] cid Framework console ID. # @return [Hash] There are two different hashes you might get: # # If the console ID is invalid, you will get a hash like the following: @@ -101,14 +101,14 @@ class RPC_Console < RPC_Base # Sends an input (such as a command) to the framework console. # - # @param [Fixnum] cid Framework console ID. + # @param [Integer] cid Framework console ID. # @param [String] data User input. # @return [Hash] There are two different hashes you might get: # # If the console ID is invalid, you will get a hash like the following: # * 'result' [String] A value that says 'failure'. # If the console ID is invalid, you will get a hash like the following: - # * 'wrote' [Fixnum] Number of bytes sent. + # * 'wrote' [Integer] Number of bytes sent. # @note Remember to add a newline (\\r\\n) at the end of input, otherwise # the console will not do anything. And you will need to use the # #rpc_read method to retrieve the output again. @@ -124,7 +124,7 @@ class RPC_Console < RPC_Base # Returns the tab-completed version of your input (such as a module path). # - # @param [Fixnum] cid Framework console ID. + # @param [Integer] cid Framework console ID. # @param [String] line Command. # @return [Hash] There are two different hashes you might get: # @@ -146,7 +146,7 @@ class RPC_Console < RPC_Base # Kills a framework session. This serves the same purpose as [CTRL]+[C] to abort an interactive session. # You might also want to considering using the session API calls instead of this. # - # @param [Fixnum] cid Framework console ID. + # @param [Integer] cid Framework console ID. # @return [Hash] A hash indicating whether the action was successful or not. It contains: # * 'result' [String] A message that says 'success' if the console ID is valid (and successfully killed, otherwise 'failed') # @example Here's how you would use this from the client: @@ -162,7 +162,7 @@ class RPC_Console < RPC_Base # Detaches a framework session. This serves the same purpose as [CTRL]+[Z] to # background an interactive session. # - # @param [Fixnum] cid Framework console ID. + # @param [Integer] cid Framework console ID. # @return [Hash] A hash indicating whether the action was successful or not. It contains: # * 'result' [String] A message that says 'success' if the console ID is valid (and successfully detached, otherwise 'failed') # @example Here's how you would use this from the client: diff --git a/lib/msf/core/rpc/v10/rpc_core.rb b/lib/msf/core/rpc/v10/rpc_core.rb index 0fd7191627..f6b62151a4 100644 --- a/lib/msf/core/rpc/v10/rpc_core.rb +++ b/lib/msf/core/rpc/v10/rpc_core.rb @@ -84,12 +84,12 @@ class RPC_Core < RPC_Base # Reloads framework modules. This will take some time to complete. # # @return [Hash] Module stats that contain the following keys: - # * 'exploits' [Fixnum] The number of exploits reloaded. - # * 'auxiliary' [Fixnum] The number of auxiliary modules reloaded. - # * 'post' [Fixnum] The number of post modules reloaded. - # * 'encoders' [Fixnum] The number of encoders reloaded. - # * 'nops' [Fixnum] The number of NOP modules reloaded. - # * 'payloads' [Fixnum] The number of payloads reloaded. + # * 'exploits' [Integer] The number of exploits reloaded. + # * 'auxiliary' [Integer] The number of auxiliary modules reloaded. + # * 'post' [Integer] The number of post modules reloaded. + # * 'encoders' [Integer] The number of encoders reloaded. + # * 'nops' [Integer] The number of NOP modules reloaded. + # * 'payloads' [Integer] The number of payloads reloaded. # @example Here's how you would use this from the client: # rpc.call('core.reload_modules') def rpc_reload_modules @@ -105,12 +105,12 @@ class RPC_Core < RPC_Base # # @param [String] path The new path to load. # @return [Hash] Module stats that contain the following keys: - # * 'exploits' [Fixnum] The number of exploits loaded. - # * 'auxiliary' [Fixnum] The number of auxiliary modules loaded. - # * 'post' [Fixnum] The number of post modules loaded. - # * 'encoders' [Fixnum] The number of encoders loaded. - # * 'nops' [Fixnum] The number of NOP modules loaded. - # * 'payloads' [Fixnum] The number of payloads loaded. + # * 'exploits' [Integer] The number of exploits loaded. + # * 'auxiliary' [Integer] The number of auxiliary modules loaded. + # * 'post' [Integer] The number of post modules loaded. + # * 'encoders' [Integer] The number of encoders loaded. + # * 'nops' [Integer] The number of NOP modules loaded. + # * 'payloads' [Integer] The number of payloads loaded. # @example Here's how you would use this from the client: # rpc.call('core.add_module_path', '/tmp/modules/') def rpc_add_module_path(path) @@ -122,12 +122,12 @@ class RPC_Core < RPC_Base # Returns the module stats. # # @return [Hash] Module stats that contain the following keys: - # * 'exploits' [Fixnum] The number of exploits. - # * 'auxiliary' [Fixnum] The number of auxiliary modules. - # * 'post' [Fixnum] The number of post modules. - # * 'encoders' [Fixnum] The number of encoders. - # * 'nops' [Fixnum] The number of NOP modules. - # * 'payloads' [Fixnum] The number of payloads. + # * 'exploits' [Integer] The number of exploits. + # * 'auxiliary' [Integer] The number of auxiliary modules. + # * 'post' [Integer] The number of post modules. + # * 'encoders' [Integer] The number of encoders. + # * 'nops' [Integer] The number of NOP modules. + # * 'payloads' [Integer] The number of payloads. # @example Here's how you would use this from the client: # rpc.call('core.module_stats') def rpc_module_stats @@ -170,7 +170,7 @@ class RPC_Core < RPC_Base # Kills a framework thread. # - # @param [Fixnum] tid The thread ID to kill. + # @param [Integer] tid The thread ID to kill. # @return [Hash] A hash indicating the action was successful. It contains the following key: # * 'result' [String] A successful message: 'success' # @example Here's how you would use this from the client: diff --git a/lib/msf/core/rpc/v10/rpc_db.rb b/lib/msf/core/rpc/v10/rpc_db.rb index 8ed864d14f..db88cc0a73 100644 --- a/lib/msf/core/rpc/v10/rpc_db.rb +++ b/lib/msf/core/rpc/v10/rpc_db.rb @@ -246,10 +246,10 @@ public # * 'creds' [Array] An array of credentials. Each hash in the array will have the following: # * 'user' [String] Username. # * 'pass' [String] Password. - # * 'updated_at' [Fixnum] Last updated at. + # * 'updated_at' [Integer] Last updated at. # * 'type' [String] Password type. # * 'host' [String] Host. - # * 'port' [Fixnum] Port. + # * 'port' [Integer] Port. # * 'proto' [String] Protocol. # * 'sname' [String] Service name. # @example Here's how you would use this from the client: @@ -301,7 +301,7 @@ public # * 500 Invalid workspace. # @return [Hash] Host information that starts with the following hash key: # * 'hosts' [Array] An array of hosts. Each hash in the array will have the following: - # * 'created_at' [Fixnum] Creation date. + # * 'created_at' [Integer] Creation date. # * 'address' [String] IP address. # * 'mac' [String] MAC address. # * 'name' [String] Computer name. @@ -310,7 +310,7 @@ public # * 'os_flavor' [String] OS flavor. # * 'os_sp' [String] Service pack. # * 'os_lang' [String] OS language. - # * 'updated_at' [Fixnum] Last updated at. + # * 'updated_at' [Integer] Last updated at. # * 'purpose' [String] Host purpose (example: server) # * 'info' [String] Additional information about the host. # @example Here's how you would use this from the client: @@ -353,8 +353,8 @@ public # # @param [Hash] xopts Options: # @option xopts [String] :workspace Name of workspace. - # @option xopts [Fixnum] :limit Limit. - # @option xopts [Fixnum] :offset Offset. + # @option xopts [Integer] :limit Limit. + # @option xopts [Integer] :offset Offset. # @option xopts [String] :proto Protocol. # @option xopts [String] :address Address. # @option xopts [String] :ports Port range. @@ -366,9 +366,9 @@ public # @return [Hash] A hash with the following keys: # * 'services' [Array] In each hash of the array, you will get these keys: # * 'host' [String] Host. - # * 'created_at' [Fixnum] Last created at. - # * 'updated_at' [Fixnum] Last updated at. - # * 'port' [Fixnum] Port. + # * 'created_at' [Integer] Last created at. + # * 'updated_at' [Integer] Last updated at. + # * 'port' [Integer] Port. # * 'proto' [String] Protocol. # * 'state' [String] Service state. # * 'name' [String] Service name. @@ -413,8 +413,8 @@ public # # @param [Hash] xopts Options: # @option xopts [String] :workspace Name of workspace. - # @option xopts [Fixnum] :limit Limit. - # @option xopts [Fixnum] :offset Offset. + # @option xopts [Integer] :limit Limit. + # @option xopts [Integer] :offset Offset. # @option xopts [String] :proto Protocol. # @option xopts [String] :address Address. # @option xopts [String] :ports Port range. @@ -424,9 +424,9 @@ public # * 500 Invalid workspace. # @return [Hash] A hash with the following key: # * 'vulns' [Array] In each hash of the array, you will get these keys: - # * 'port' [Fixnum] Port. + # * 'port' [Integer] Port. # * 'proto' [String] Protocol. - # * 'time' [Fixnum] Time reported. + # * 'time' [Integer] Time reported. # * 'host' [String] Vulnerable host. # * 'name' [String] Exploit that was used. # * 'refs' [String] Vulnerability references. @@ -472,10 +472,10 @@ public # @raise [Msf::RPC::Exception] Database not loaded. # @return [Hash] A hash with the following key: # * 'workspaces' [Array] In each hash of the array, you will get these keys: - # * 'id' [Fixnum] Workspace ID. + # * 'id' [Integer] Workspace ID. # * 'name' [String] Workspace name. - # * 'created_at' [Fixnum] Last created at. - # * 'updated_at' [Fixnum] Last updated at. + # * 'created_at' [Integer] Last created at. + # * 'updated_at' [Integer] Last updated at. # @example Here's how you would use this from the client: # rpc.call('db.workspaces') def rpc_workspaces @@ -500,7 +500,7 @@ public # @raise [Msf::RPC::Exception] Database not loaded. Try: rpc.call('console.create') # @return [Hash] A hash with the following keys: # * 'workspace' [String] Workspace name. - # * 'workspace_id' [Fixnum] Workspace ID. + # * 'workspace_id' [Integer] Workspace ID. # @example Here's how you would use this from the client: # rpc.call('db.current_workspace') def rpc_current_workspace @@ -518,9 +518,9 @@ public # @return [Hash] A hash with the following key: # * 'workspace' [Array] In each hash of the array, you will get these keys: # * 'name' [String] Workspace name. - # * 'id' [Fixnum] Workspace ID. - # * 'created_at' [Fixnum] Last created at. - # * 'updated_at' [Fixnum] Last updated at. + # * 'id' [Integer] Workspace ID. + # * 'created_at' [Integer] Last created at. + # * 'updated_at' [Integer] Last updated at. # @example Here's how you would use this from the client: # rpc.call('db.get_workspace') def rpc_get_workspace(wspace) @@ -631,7 +631,7 @@ public # * 500 Invalid workspace. # @return [Hash] A hash that contains the following: # * 'host' [Array] Each hash in the array contains the following: - # * 'created_at' [Fixnum] Last created at. + # * 'created_at' [Integer] Last created at. # * 'address' [String] Address. # * 'mac' [String] Mac address. # * 'name' [String] Host name. @@ -640,7 +640,7 @@ public # * 'os_flavor' [String] OS flavor. # * 'os_sp' [String] OS service pack. # * 'os_lang' [String] OS language. - # * 'updated_at' [Fixnum] Last updated at. + # * 'updated_at' [Integer] Last updated at. # * 'purpose' [String] Purpose. Example: 'server'. # * 'info' [String] Additional information. # @example Here's how you would use this from the client: @@ -739,7 +739,7 @@ public # @param [Hash] xopts Filters for the search, see below: # @option xopts [String] :workspace Workspace name. # @option xopts [String] :proto Protocol. - # @option xopts [Fixnum] :port Port. + # @option xopts [Integer] :port Port. # @option xopts [String] :names Service names. # @raise [Msf::RPC::ServerException] You might get one of these errors: # * 500 ActiveRecord::ConnectionNotEstablished. Try: rpc.call('console.create'). @@ -748,8 +748,8 @@ public # @return [Hash] A hash that contains the following key: # * 'service' [Array] Each hash in the array contains the following: # * 'host' [String] Host address. - # * 'created_at' [Fixnum] Creation date. - # * 'port' [Fixnum] Port. + # * 'created_at' [Integer] Creation date. + # * 'port' [Integer] Port. # * 'proto' [String] Protocol. # * 'state' [String] Service state. # * 'name' [String] Service name. @@ -809,7 +809,7 @@ public # @option xopts [String] :address Same as :addr. # @option xopts [String] :host Same as :address. # @option xopts [String] :proto Protocol. - # @option xopts [Fixnum] :port Port. + # @option xopts [Integer] :port Port. # @option xopts [String] :ntype Note type. # @raise [Msf::RPC::ServerException] You might get one of these errors: # * 500 ActiveRecord::ConnectionNotEstablished. Try: rpc.call('console.create'). @@ -818,10 +818,10 @@ public # @return [Hash] A hash that contains the following: # * 'note' [Array] Each hash in the array contains the following: # * 'host' [String] Host. - # * 'port' [Fixnum] Port. + # * 'port' [Integer] Port. # * 'proto' [String] Protocol. - # * 'created_at' [Fixnum] Last created at. - # * 'updated_at' [Fixnum] Last updated at. + # * 'created_at' [Integer] Last created at. + # * 'updated_at' [Integer] Last updated at. # * 'ntype' [String] Note type. # * 'data' [String] Note data. # * 'critical' [String] A boolean indicating criticality. @@ -867,8 +867,8 @@ public # @return [Hash] A hash that contains the client connection: # * 'client' [Array] Each hash of the array contains the following: # * 'host' [String] Host IP. - # * 'created_at' [Fixnum] Created date. - # * 'updated_at' [Fixnum] Last updated at. + # * 'created_at' [Integer] Created date. + # * 'updated_at' [Integer] Last updated at. # * 'ua_string' [String] User-Agent string. # * 'ua_name' [String] User-Agent name. # * 'ua_ver' [String] User-Agent version. @@ -931,7 +931,7 @@ public # @option xopts [String] :host An IP address or a Host object to associate with this note. # @option xopts [String] :service A Service object to associate with this note. # @option xopts [String] :data Whatever it is you're making a note of. - # @option xopts [Fixnum] :port Along with +:host+ and +:proto+, a service to associate with this note. + # @option xopts [Integer] :port Along with +:host+ and +:proto+, a service to associate with this note. # @option xopts [String] :proto Along with +:host+ and +:port+, a service to associate with this note. # @option xopts [Hash] A hash that contains the following information. # * :unique [Boolean] Allow only a single Note per +:host+/+:type+ pair. @@ -981,7 +981,7 @@ public # * 500 Invalid workspace. # @return [Hash] A hash that contains the following: # * 'notes' [Array] Each hash in the array contains the following: - # * 'time' [Fixnum] Creation date. + # * 'time' [Integer] Creation date. # * 'host' [String] Host address. # * 'service' [String] Service name or port. # * 'type' [String] Host type. @@ -1045,7 +1045,7 @@ public # @option xopts [String] :host Host address. # @option xopts [String] :address Same as :host. # @option xopts [Array] :addresses Same as :address. - # @option xopts [Fixnum] :port Port. + # @option xopts [Integer] :port Port. # @option xopts [String] :proto Protocol. # @option xopts [String] :name Name of the vulnerability. # @raise [Msf::RPC::ServerException] You might get one of these errors: @@ -1056,7 +1056,7 @@ public # * 'result' [String] A message that says 'success'. # * 'deleted' [Array] Each hash in the array contains the following: # * 'address' [String] Host address. - # * 'port' [Fixnum] Port. + # * 'port' [Integer] Port. # * 'proto' [String] Protocol. # * 'name' [String] Vulnerability name. # @example Here's how you would use this from the client: @@ -1139,7 +1139,7 @@ public # @option xopts [String] :host Host address. # @option xopts [String] :address Same as :host. # @option xopts [Array] :addresses Same as :address. - # @option xopts [Fixnum] :port Port. + # @option xopts [Integer] :port Port. # @option xopts [String] :proto Protocol. # @option xopts [String] :ntype Note type. # @raise [Msf::RPC::ServerException] You might get one of these errors: @@ -1150,7 +1150,7 @@ public # * 'result' [String] A message that says 'success'. # * 'deleted' [Array] Each hash in the array contains the following: # * 'address' [String] Host address. - # * 'port' [Fixnum] Port. + # * 'port' [Integer] Port. # * 'proto' [String] Protocol. # * 'ntype' [String] Note type. # @example Here's how you would use this from the client: @@ -1180,7 +1180,7 @@ public # @option xopts [String] :host Host address. # @option xopts [String] :address Same as :host. # @option xopts [Array] :addresses Host addresses. - # @option xopts [Fixnum] :port Port. + # @option xopts [Integer] :port Port. # @option xopts [String] :proto Protocol. # @raise [Msf::RPC::ServerException] You might get one of these errors: # * 500 ActiveRecord::ConnectionNotEstablished. Try: rpc.call('console.create'). @@ -1191,7 +1191,7 @@ public # * 'deleted' [Array] If result says success, then you will get this key. # Each hash in the array contains: # * 'address' [String] Host address. - # * 'port' [Fixnum] Port. + # * 'port' [Integer] Port. # * 'proto' [String] Protocol. # @example Here's how you would use this from the client: # rpc.call('db.del_service', {:host=>ip}) @@ -1331,8 +1331,8 @@ public # # @param [Hash] xopts Options: # @option xopts [String] :workspace Workspace name. - # @option xopts [Fixnum] :limit Limit. - # @option xopts [Fixnum] :offset Offset. + # @option xopts [Integer] :limit Limit. + # @option xopts [Integer] :offset Offset. # @raise [Msf::RPC::ServerException] You might get one of these errors: # * 500 ActiveRecord::ConnectionNotEstablished. Try: rpc.call('console.create'). # * 500 Database not loaded. Try: rpc.call('console.create') @@ -1340,8 +1340,8 @@ public # @return [Hash] A hash that contains the following: # * 'events' [Array] Each hash in the array contains the following: # * 'host' [String] Host address. - # * 'created_at' [Fixnum] Creation date. - # * 'updated_at' [Fixnum] Last updated at. + # * 'created_at' [Integer] Creation date. + # * 'updated_at' [Integer] Last updated at. # * 'name' [String] Event name. # * 'critical' [Boolean] Criticality. # * 'username' [String] Username. @@ -1401,7 +1401,7 @@ public # @param [Hash] xopts Information about the looted item. # @option xopts [String] :workspace Workspace name. # @option xopts [String] :host Host address. - # @option xopts [Fixnum] :port Port. Should match :service. + # @option xopts [Integer] :port Port. Should match :service. # @option xopts [String] :proto Protocol. Should match :service. # @option xopts [String] :path Required. Path where the item was looted. # @option xopts [String] :type Loot type. @@ -1435,8 +1435,8 @@ public # # @param [Hash] xopts Filters that narrow down the search: # @option xopts [Hash] :workspace Workspace name. - # @option xopts [Fixnum] :limit Limit. - # @option xopts [Fixnum] :offset Offset. + # @option xopts [Integer] :limit Limit. + # @option xopts [Integer] :offset Offset. # @raise [Msf::RPC::ServerException] You might get one of these errors: # * 500 ActiveRecord::ConnectionNotEstablished. Try: rpc.call('console.create'). # * 500 Database not loaded. Try: rpc.call('console.create') @@ -1448,8 +1448,8 @@ public # * 'ltype' [String] Loot type. # * 'ctype' [String] Content type. # * 'data' [String] Looted data. - # * 'created_at' [Fixnum] Creation date. - # * 'updated_at' [Fixnum] Last updated at. + # * 'created_at' [Integer] Creation date. + # * 'updated_at' [Integer] Last updated at. # * 'name' [String] Name. # * 'info' [String] Additional information. # @example Here's how you would use this from the client: @@ -1540,7 +1540,7 @@ public # @param [Hash] xopts Filters to narrow down which vulnerabilities to find. # @option xopts [String] :workspace Workspace name. # @option xopts [String] :proto Protocol. - # @option xopts [Fixnum] :port Port. + # @option xopts [Integer] :port Port. # @raise [Msf::RPC::ServerException] You might get one of these errors: # * 500 ActiveRecord::ConnectionNotEstablished. Try: rpc.call('console.create'). # * 500 Database not loaded. Try: rpc.call('console.create') @@ -1548,10 +1548,10 @@ public # @return [Hash] A hash that contains the following: # * 'vuln' [Array] Each hash in the array contains the following: # * 'host' [String] Host address. - # * 'port' [Fixnum] Port. + # * 'port' [Integer] Port. # * 'proto' [String] Protocol. - # * 'created_at' [Fixnum] Creation date. - # * 'updated_at' [Fixnum] Last updated at. + # * 'created_at' [Integer] Creation date. + # * 'updated_at' [Integer] Last updated at. # * 'name' [String] Vulnerability name. # * 'info' [String] Additional information. # * 'refs' [Array] Reference names. @@ -1624,8 +1624,8 @@ public # * 'ua_string' [String] User-agent string. # * 'ua_name' [String] Browser name. # * 'ua_ver' [String] Browser version. - # * 'created_at' [Fixnum] Creation date. - # * 'updated_at' [Fixnum] Last updated at. + # * 'created_at' [Integer] Creation date. + # * 'updated_at' [Integer] Last updated at. # @example Here's how you would use this from the client: # rpc.call('db.clients', {}) def rpc_clients(xopts) diff --git a/lib/msf/core/rpc/v10/rpc_job.rb b/lib/msf/core/rpc/v10/rpc_job.rb index 8624cb9af4..33a25790d2 100644 --- a/lib/msf/core/rpc/v10/rpc_job.rb +++ b/lib/msf/core/rpc/v10/rpc_job.rb @@ -21,7 +21,7 @@ class RPC_Job < RPC_Base # Stops a job. # - # @param [Fixnum] jid Job ID. + # @param [Integer] jid Job ID. # @raise [Msf::RPC::Exception] A 500 response indicating an invalid job ID was given. # @return [Hash] A hash indicating the action was successful. It contains the following key: # * 'result' [String] A successful message: 'success' @@ -37,12 +37,12 @@ class RPC_Job < RPC_Base # Returns information about a job. # - # @param [Fixnum] jid Job ID. + # @param [Integer] jid Job ID. # @raise [Msf::RPC::Exception] A 500 response indicating an invalid job ID was given. # @return [Hash] A hash that contains information about the job, such as the following (and maybe more): - # * 'jid' [Fixnum] The Job ID. + # * 'jid' [Integer] The Job ID. # * 'name' [String] The name of the job. - # * 'start_time' [Fixnum] The start time. + # * 'start_time' [Integer] The start time. # * 'datastore' [Hash] Datastore options for the module. # @example Here's how you would use this from the client: # rpc.call('job.info', 0) diff --git a/lib/msf/core/rpc/v10/rpc_module.rb b/lib/msf/core/rpc/v10/rpc_module.rb index ef80fadf3c..a29d367de8 100644 --- a/lib/msf/core/rpc/v10/rpc_module.rb +++ b/lib/msf/core/rpc/v10/rpc_module.rb @@ -168,7 +168,7 @@ class RPC_Module < RPC_Base # @param [String] mname Post module name. For example: 'windows/wlan/wlan_profile'. # @raise [Msf::RPC::Exception] Module not found (wrong name). # @return [Hash] The post module's compatible sessions. It contains the following key: - # * 'sessions' [Array] A list of session IDs. + # * 'sessions' [Array] A list of session IDs. # @example Here's how you would use this from the client: # rpc.call('module.compatible_sessions', 'windows/wlan/wlan_profile') def rpc_compatible_sessions(mname) @@ -183,7 +183,7 @@ class RPC_Module < RPC_Base # Returns the compatible target-specific payloads for an exploit. # # @param [String] mname Exploit module name. For example: 'windows/smb/ms08_067_netapi' - # @param [Fixnum] target A specific target the exploit module provides. + # @param [Integer] target A specific target the exploit module provides. # @raise [Msf::RPC::Exception] Module not found (wrong name). # @return [Hash] The exploit's target-specific payloads. It contains the following key: # * 'payloads' [Array] A list of payloads. @@ -259,7 +259,7 @@ class RPC_Module < RPC_Base # even see these sessions, because it belongs to a different framework instance. # However, this restriction does not apply to the database. # @return [Hash] It contains the following keys: - # * 'job_id' [Fixnum] Job ID. + # * 'job_id' [Integer] Job ID. # * 'uuid' [String] UUID. # @example Here's how you would use this from the client: # # Starts a windows/meterpreter/reverse_tcp on port 6669 @@ -301,7 +301,7 @@ class RPC_Module < RPC_Base # @option options [String] 'badchars' Bad characters. # @option options [String] 'platform' Platform. # @option options [String] 'arch' Architecture. - # @option options [Fixnum] 'ecount' Number of times to encode. + # @option options [Integer] 'ecount' Number of times to encode. # @option options [TrueClass] 'inject' To enable injection. # @option options [String] 'template' The template file (an executable). # @option options [String] 'template_path' Template path. diff --git a/lib/msf/core/rpc/v10/rpc_session.rb b/lib/msf/core/rpc/v10/rpc_session.rb index 29c4682c0b..11ae24775b 100644 --- a/lib/msf/core/rpc/v10/rpc_session.rb +++ b/lib/msf/core/rpc/v10/rpc_session.rb @@ -18,7 +18,7 @@ class RPC_Session < RPC_Base # * 'info' [String] Session info (most likely the target's computer name). # * 'workspace' [String] Name of the workspace. # * 'session_host' [String] Session host. - # * 'session_port' [Fixnum] Session port. + # * 'session_port' [Integer] Session port. # * 'target_host' [String] Target host. # * 'username' [String] Username. # * 'uuid' [String] UUID. @@ -58,7 +58,7 @@ class RPC_Session < RPC_Base # Stops a session. # - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @raise [Msf::RPC::Exception] Unknown session ID. # @return [Hash] A hash indicating the action was successful. It contains the following key: # * 'result' [String] A message that says 'success'. @@ -81,8 +81,8 @@ class RPC_Session < RPC_Base # sequence number on their own (making multiple views into the same # session possible, regardless of position in the stream) # @see #rpc_ring_read - # @param [Fixnum] sid Session ID. - # @param [Fixnum] ptr Pointer. + # @param [Integer] sid Session ID. + # @param [Integer] ptr Pointer. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. # * 500 Invalid session type. @@ -117,10 +117,10 @@ class RPC_Session < RPC_Base # * 500 Session ID is unknown. # * 500 Invalid session type. # * 500 Session is disconnected. - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @param [String] data The data to write. # @return [Hash] - # * 'write_count' [Fixnum] Number of bytes written. + # * 'write_count' [Integer] Number of bytes written. # @example Here's how you would use this from the client: # rpc.call('session.shell_write', 2, "DATA") def rpc_shell_write( sid, data) @@ -132,9 +132,9 @@ class RPC_Session < RPC_Base # Upgrades a shell to a meterpreter. # # @note This uses post/multi/manage/shell_to_meterpreter. - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @param [String] lhost Local host. - # @param [Fixnum] lport Local port. + # @param [Integer] lport Local port. # @return [Hash] A hash indicating the actioin was successful. It contains the following key: # * 'result' [String] A message that says 'success' # @example Here's how you would use this from the client: @@ -153,7 +153,7 @@ class RPC_Session < RPC_Base # @note Multiple concurrent callers writing and reading the same Meterperter session can lead to # a conflict, where one caller gets the others output and vice versa. Concurrent access to a # Meterpreter session is best handled by post modules. - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. # * 500 Invalid session type. @@ -175,8 +175,8 @@ class RPC_Session < RPC_Base # Reads from a session (such as a command output). # - # @param [Fixnum] sid Session ID. - # @param [Fixnum] ptr Pointer. + # @param [Integer] sid Session ID. + # @param [Integer] ptr Pointer. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. # * 500 Invalid session type. @@ -199,7 +199,7 @@ class RPC_Session < RPC_Base # Sends an input to a session (such as a command). # - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @param [String] data Data to write. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. @@ -221,7 +221,7 @@ class RPC_Session < RPC_Base # Returns the last sequence (last issued ReadPointer) for a shell session. # - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. # * 500 Invalid session type. @@ -237,7 +237,7 @@ class RPC_Session < RPC_Base # Clears a shell session. This may be useful to reclaim memory for idle background sessions. # - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. # * 500 Invalid session type. @@ -262,7 +262,7 @@ class RPC_Session < RPC_Base # @note Multiple concurrent callers writing and reading the same Meterperter session can lead to # a conflict, where one caller gets the others output and vice versa. Concurrent access to a # Meterpreter session is best handled by post modules. - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @param [String] data Input to the meterpreter prompt. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. @@ -294,7 +294,7 @@ class RPC_Session < RPC_Base # Detaches from a meterpreter session. Serves the same purpose as [CTRL]+[Z]. # - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. # * 500 Invalid session type. @@ -316,7 +316,7 @@ class RPC_Session < RPC_Base # Kills a meterpreter session. Serves the same purpose as [CTRL]+[C]. # - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. # * 500 Invalid session type. @@ -339,7 +339,7 @@ class RPC_Session < RPC_Base # Returns a tab-completed version of your meterpreter prompt input. # - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @param [String] line Input. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. @@ -359,7 +359,7 @@ class RPC_Session < RPC_Base # Runs a meterpreter command even if interacting with a shell or other channel. # You will want to use the #rpc_meterpreter_read to retrieve the output. # - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @param [String] data Command. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. @@ -385,7 +385,7 @@ class RPC_Session < RPC_Base # @deprecated Metasploit no longer maintains or accepts meterpreter scripts. Please try to use # post modules instead. # @see Msf::RPC::RPC_Module#rpc_execute You should use Msf::RPC::RPC_Module#rpc_execute instead. - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @param [String] data Meterpreter script name. # @return [Hash] A hash indicating the action was successful. It contains the following key: # * 'result' [String] 'success' @@ -397,7 +397,7 @@ class RPC_Session < RPC_Base # Changes the Transport of a given Meterpreter Session # - # @param sid [Fixnum] The Session ID of the `Msf::Session` + # @param sid [Integer] The Session ID of the `Msf::Session` # @option opts [String] :transport The transport protocol to use (e.g. reverse_tcp, reverse_http, bind_tcp etc) # @option opts [String] :lhost The LHOST of the listener to use # @option opts [String] :lport The LPORT of the listener to use @@ -430,7 +430,7 @@ class RPC_Session < RPC_Base # Returns the separator used by the meterpreter. # - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @raise [Msf::RPC::Exception] An error that could be one of these: # * 500 Session ID is unknown. # * 500 Invalid session type. @@ -449,7 +449,7 @@ class RPC_Session < RPC_Base # Returns all the compatible post modules for this session. # - # @param [Fixnum] sid Session ID. + # @param [Integer] sid Session ID. # @return [Hash] Post modules. It contains the following key: # * 'modules' [Array] An array of post module names. Example: ['post/windows/wlan/wlan_profile'] # @example Here's how you would use this from the client: diff --git a/lib/msf/ui/console/command_dispatcher/db.rb b/lib/msf/ui/console/command_dispatcher/db.rb index 95044b8294..88880ea100 100644 --- a/lib/msf/ui/console/command_dispatcher/db.rb +++ b/lib/msf/ui/console/command_dispatcher/db.rb @@ -1465,7 +1465,7 @@ class Db case input when String input = input.downcase - when Fixnum + when Integer input = "%016" % input when Time input = input.strftime("%Y%m%d%H%M%S%L") diff --git a/lib/msf/util/exe.rb b/lib/msf/util/exe.rb index d9c7d6edb6..d9e14ecf45 100644 --- a/lib/msf/util/exe.rb +++ b/lib/msf/util/exe.rb @@ -2297,7 +2297,7 @@ require 'msf/core/exe/segment_appender' # @param mo [String] # @param err_msg [String] # @raise [RuntimeError] if the "PAYLOAD:" is not found - # @return [Fixnum] + # @return [Integer] def self.find_payload_tag(mo, err_msg) bo = mo.index('PAYLOAD:') unless bo diff --git a/lib/msf/util/payload_cached_size.rb b/lib/msf/util/payload_cached_size.rb index 788e8ee04d..b9ede5e9b0 100644 --- a/lib/msf/util/payload_cached_size.rb +++ b/lib/msf/util/payload_cached_size.rb @@ -79,7 +79,7 @@ class PayloadCachedSize # Calculates the CachedSize value for a payload module # # @param mod [Msf::Payload] The class of the payload module to update - # @return [Fixnum] + # @return [Integer] def self.compute_cached_size(mod) return ":dynamic" if is_dynamic?(mod) return mod.generate_simple(OPTS).size @@ -88,9 +88,9 @@ class PayloadCachedSize # Determines whether a payload generates a static sized output # # @param mod [Msf::Payload] The class of the payload module to update - # @param generation_count [Fixnum] The number of iterations to use to + # @param generation_count [Integer] The number of iterations to use to # verify that the size is static. - # @return [Fixnum] + # @return [Integer] def self.is_dynamic?(mod, generation_count=5) [*(1..generation_count)].map{|x| mod.generate_simple(OPTS).size}.uniq.length != 1 diff --git a/lib/net/dns/rr/classes.rb b/lib/net/dns/rr/classes.rb index 2ec1aaf1dd..1759bff65d 100644 --- a/lib/net/dns/rr/classes.rb +++ b/lib/net/dns/rr/classes.rb @@ -37,7 +37,7 @@ module Net # :nodoc: case cls when String return Classes.has_key?(cls) - when Fixnum + when Integer return Classes.invert.has_key?(cls) else raise ClassArgumentError, "Wrong class: #{cls.class}" @@ -48,7 +48,7 @@ module Net # :nodoc: # given the numeric value def self.to_str(cls) case cls - when Fixnum + when Integer if Classes.invert.has_key? cls return Classes.invert[cls] else @@ -73,7 +73,7 @@ module Net # :nodoc: when String # type in the form "A" or "NS" new_from_string(cls.upcase) - when Fixnum + when Integer # type in numeric form new_from_num(cls) when nil diff --git a/lib/net/dns/rr/types.rb b/lib/net/dns/rr/types.rb index e4507d23c2..e114abdf2d 100644 --- a/lib/net/dns/rr/types.rb +++ b/lib/net/dns/rr/types.rb @@ -90,7 +90,7 @@ module Net # :nodoc: case type when String return Types.has_key?(type) - when Fixnum + when Integer return Types.invert.has_key?(type) else raise TypeArgumentError, "Wrong type class: #{type.class}" @@ -101,7 +101,7 @@ module Net # :nodoc: # given the numeric value def self.to_str(type) case type - when Fixnum + when Integer if Types.invert.has_key? type return Types.invert[type] else @@ -126,7 +126,7 @@ module Net # :nodoc: when String # type in the form "A" or "NS" new_from_string(type.upcase) - when Fixnum + when Integer # type in numeric form new_from_num(type) when nil diff --git a/lib/rex/payloads/meterpreter/uri_checksum.rb b/lib/rex/payloads/meterpreter/uri_checksum.rb index b275cdb8ae..ac42c0c0f8 100644 --- a/lib/rex/payloads/meterpreter/uri_checksum.rb +++ b/lib/rex/payloads/meterpreter/uri_checksum.rb @@ -61,9 +61,9 @@ module Rex # Create a URI that matches the specified checksum and payload uuid # - # @param sum [Fixnum] A checksum mode value to use for the generated url + # @param sum [Integer] A checksum mode value to use for the generated url # @param uuid [Msf::Payload::UUID] A valid UUID object - # @param len [Fixnum] An optional URI length value, including the leading slash + # @param len [Integer] An optional URI length value, including the leading slash # @return [String] The URI string for connections def generate_uri_uuid(sum, uuid, len=nil) curl_uri_len = URI_CHECKSUM_UUID_MIN_LEN+rand(URI_CHECKSUM_CONN_MAX_LEN-URI_CHECKSUM_UUID_MIN_LEN) @@ -84,8 +84,8 @@ module Rex # Create an arbitrary length URI that matches a given checksum # - # @param sum [Fixnum] The checksum value that the generated URI should match - # @param len [Fixnum] The length of the URI to generate + # @param sum [Integer] The checksum value that the generated URI should match + # @param len [Integer] The length of the URI to generate # @param prefix [String] The optional prefix to use to build the URI # @return [String] The URI string that checksums to the given value def generate_uri_checksum(sum, len=5, prefix="") @@ -122,7 +122,7 @@ module Rex # Return the numerical checksum for a given mode symbol # # @param mode [Symbol] The mode symbol to lookup (:connect, :init_native, :init_python, :init_java) - # @return [Fixnum] The URI checksum value corresponding with the mode + # @return [Integer] The URI checksum value corresponding with the mode def uri_checksum_lookup(mode) sum = URI_CHECKSUM_MODES.keys.select{|ksum| URI_CHECKSUM_MODES[ksum] == mode}.first unless sum diff --git a/lib/rex/post/meterpreter/extensions/kiwi/kiwi.rb b/lib/rex/post/meterpreter/extensions/kiwi/kiwi.rb index f064c2bf7a..7858873d3e 100644 --- a/lib/rex/post/meterpreter/extensions/kiwi/kiwi.rb +++ b/lib/rex/post/meterpreter/extensions/kiwi/kiwi.rb @@ -332,8 +332,8 @@ class Kiwi < Extension # @param opts[:domain_name] [String] Domain name. # @param opts[:domain_sid] [String] SID of the domain. # @param opts[:krbtgt_hash] [String] The kerberos ticket granting token. - # @param opts[:id] [Fixnum] ID of the user to grant the token for. - # @param opts[:group_ids] [Array] IDs of the groups to assign to the user + # @param opts[:id] [Integer] ID of the user to grant the token for. + # @param opts[:group_ids] [Array] IDs of the groups to assign to the user # # @return [Array] # diff --git a/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb b/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb index 4915e70ebe..fc8af29404 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb @@ -149,19 +149,25 @@ class DLL # we care only about out-only buffers if param_desc[2] == "out" - raise "error in param #{param_desc[1]}: Out-only buffers must be described by a number indicating their size in bytes " unless args[param_idx].class == Fixnum + if !args[param_idx].kind_of? Integer + raise "error in param #{param_desc[1]}: Out-only buffers must be described by a number indicating their size in bytes" + end buffer_size = args[param_idx] if param_desc[0] == "PDWORD" # bump up the size for an x64 pointer - if( native == 'Q<' and buffer_size == 4 ) + if native == 'Q<' && buffer_size == 4 args[param_idx] = 8 buffer_size = args[param_idx] end - if( native == 'Q<' ) - raise "Please pass 8 for 'out' PDWORDS, since they require a buffer of size 8" unless buffer_size == 8 - elsif( native == 'V' ) - raise "Please pass 4 for 'out' PDWORDS, since they require a buffer of size 4" unless buffer_size == 4 + if native == 'Q<' + if buffer_size != 8 + raise "Please pass 8 for 'out' PDWORDS, since they require a buffer of size 8" + end + elsif native == 'V' + if buffer_size != 4 + raise "Please pass 4 for 'out' PDWORDS, since they require a buffer of size 4" + end end end diff --git a/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb b/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb index 79cce18143..e71e801b94 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb @@ -76,11 +76,9 @@ module DLLHelper def param_to_number(v, win_consts = @win_consts) if v.class == NilClass then return 0 - elsif v.class == Fixnum then + elsif v.kind_of? Integer then return v # ok, it's already a number - elsif v.class == Bignum then - return v # ok, it's already a number - elsif v.class == String then + elsif v.kind_of? String then dw = win_consts.parse(v) # might raise an exception if dw != nil return dw diff --git a/lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb b/lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb index 54f4f287a2..951cbcba8a 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb @@ -99,18 +99,24 @@ class MultiCaller # we care only about out-only buffers if param_desc[2] == "out" - raise "error in param #{param_desc[1]}: Out-only buffers must be described by a number indicating their size in bytes " unless args[param_idx].class == Fixnum + if !args[param_idx].class.kind_of? Integer + raise "error in param #{param_desc[1]}: Out-only buffers must be described by a number indicating their size in bytes " + end buffer_size = args[param_idx] # bump up the size for an x64 pointer - if( @native == 'Q<' and buffer_size == 4 ) + if @native == 'Q<' && buffer_size == 4 args[param_idx] = 8 buffer_size = args[param_idx] end - if( @native == 'Q<' ) - raise "Please pass 8 for 'out' PDWORDS, since they require a buffer of size 8" unless buffer_size == 8 + if @native == 'Q<' + if buffer_size != 8 + raise "Please pass 8 for 'out' PDWORDS, since they require a buffer of size 8" + end elsif( @native == 'V' ) - raise "Please pass 4 for 'out' PDWORDS, since they require a buffer of size 4" unless buffer_size == 4 + if buffer_size != 4 + raise "Please pass 4 for 'out' PDWORDS, since they require a buffer of size 4" + end end out_only_layout[param_desc[1]] = BufferItem.new(param_idx, out_only_size_bytes, buffer_size, param_desc[0]) diff --git a/lib/rex/post/meterpreter/extensions/stdapi/railgun/type/pointer_util.rb b/lib/rex/post/meterpreter/extensions/stdapi/railgun/type/pointer_util.rb index a7f5971d75..52163f3bc4 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/railgun/type/pointer_util.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/railgun/type/pointer_util.rb @@ -71,7 +71,7 @@ module PointerUtil # # def self.is_unpacked_pointer?(pointer, platform) # # TODO also check that the integer size is appropriate for the platform -# unless pointer.kind_of?(Fixnum) and pointer > 0 # and pointer < +# unless pointer.kind_of?(Integer) and pointer > 0 # and pointer < # return false # end # diff --git a/lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb b/lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb index 08b701f66e..e4dd66ec7f 100644 --- a/lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb +++ b/lib/rex/post/meterpreter/extensions/stdapi/railgun/util.rb @@ -641,7 +641,7 @@ class Util # state of each bit. # # Parameters: - # +value+:: a bit field represented by a Fixnum + # +value+:: a bit field represented by a Integer # +mappings+:: { 'WINAPI_CONSTANT_NAME' => :descriptive_symbol, ... } # # Returns: diff --git a/lib/rex/post/meterpreter/packet.rb b/lib/rex/post/meterpreter/packet.rb index 97b485add8..f93b2de5b6 100644 --- a/lib/rex/post/meterpreter/packet.rb +++ b/lib/rex/post/meterpreter/packet.rb @@ -139,7 +139,7 @@ class Tlv if (value != nil) if (type & TLV_META_TYPE_STRING == TLV_META_TYPE_STRING) - if (value.kind_of?(Fixnum)) + if (value.kind_of?(Integer)) @value = value.to_s else @value = value.dup diff --git a/lib/rex/post/meterpreter/packet_dispatcher.rb b/lib/rex/post/meterpreter/packet_dispatcher.rb index b5a02d29a9..cb4a95702b 100644 --- a/lib/rex/post/meterpreter/packet_dispatcher.rb +++ b/lib/rex/post/meterpreter/packet_dispatcher.rb @@ -193,7 +193,7 @@ module PacketDispatcher # Sends a packet and waits for a timeout for the given time interval. # # @param packet [Packet] request to send - # @param timeout [Fixnum,nil] seconds to wait for response, or nil to ignore the + # @param timeout [Integer,nil] seconds to wait for response, or nil to ignore the # response and return immediately # @return (see #send_packet_wait_response) def send_request(packet, timeout = self.response_timeout) @@ -219,7 +219,7 @@ module PacketDispatcher # Transmits a packet and waits for a response. # # @param packet [Packet] the request packet to send - # @param timeout [Fixnum,nil] number of seconds to wait, or nil to wait + # @param timeout [Integer,nil] number of seconds to wait, or nil to wait # forever def send_packet_wait_response(packet, timeout) # First, add the waiter association for the supplied packet diff --git a/lib/rex/post/meterpreter/packet_response_waiter.rb b/lib/rex/post/meterpreter/packet_response_waiter.rb index 645d6982eb..5f2f1557d7 100644 --- a/lib/rex/post/meterpreter/packet_response_waiter.rb +++ b/lib/rex/post/meterpreter/packet_response_waiter.rb @@ -36,7 +36,7 @@ class PacketResponseWaiter # @return [Packet] attr_accessor :response - # @return [Fixnum] request ID to wait for + # @return [Integer] request ID to wait for attr_accessor :rid # @@ -84,7 +84,7 @@ class PacketResponseWaiter # # Wait for a given time interval for the response packet to arrive. # - # @param interval [Fixnum,nil] number of seconds to wait, or nil to wait + # @param interval [Integer,nil] number of seconds to wait, or nil to wait # forever # @return [Packet,nil] the response, or nil if the interval elapsed before # receiving one diff --git a/lib/rex/proto/dcerpc/svcctl/packet.rb b/lib/rex/proto/dcerpc/svcctl/packet.rb index 896f6024f8..0da50e9ac0 100644 --- a/lib/rex/proto/dcerpc/svcctl/packet.rb +++ b/lib/rex/proto/dcerpc/svcctl/packet.rb @@ -36,7 +36,7 @@ class Client # Calls OpenSCManagerW() to obtain a handle to the service control manager. # # @param rhost [String] the target host. - # @param access [Fixnum] the access flags requested. + # @param access [Integer] the access flags requested. # # @return [Array] the handle to the service control manager or nil if # the call is not successful and the Windows error code @@ -70,18 +70,18 @@ class Client # @param display_name [String] the display name. # @param binary_path [String] the path of the binary to run. # @param opts [Hash] arguments for CreateServiceW() - # @option opts [Fixnum] :access (SERVICE_ALL_ACCESS) the access level. - # @option opts [Fixnum] :type (SERVICE_WIN32_OWN_PROCESS || + # @option opts [Integer] :access (SERVICE_ALL_ACCESS) the access level. + # @option opts [Integer] :type (SERVICE_WIN32_OWN_PROCESS || # SERVICE_INTERACTIVE_PROCESS) the type of service. - # @option opts [Fixnum] :start (SERVICE_DEMAND_START) the start options. - # @option opts [Fixnum] :errors (SERVICE_ERROR_IGNORE) the error options. - # @option opts [Fixnum] :load_order_group (0) the load order group. - # @option opts [Fixnum] :dependencies (0) the dependencies of the service. - # @option opts [Fixnum] :service_start (0) - # @option opts [Fixnum] :password1 (0) - # @option opts [Fixnum] :password2 (0) - # @option opts [Fixnum] :password3 (0) - # @option opts [Fixnum] :password4 (0) + # @option opts [Integer] :start (SERVICE_DEMAND_START) the start options. + # @option opts [Integer] :errors (SERVICE_ERROR_IGNORE) the error options. + # @option opts [Integer] :load_order_group (0) the load order group. + # @option opts [Integer] :dependencies (0) the dependencies of the service. + # @option opts [Integer] :service_start (0) + # @option opts [Integer] :password1 (0) + # @option opts [Integer] :password2 (0) + # @option opts [Integer] :password3 (0) + # @option opts [Integer] :password4 (0) # # @return [String, Integer] a handle to the created service, windows # error code. @@ -182,7 +182,7 @@ class Client # # @param scm_handle [String] the SCM handle (from {#openscmanagerw}). # @param service_name [String] the name of the service to open. - # @param access [Fixnum] the level of access requested (default is maximum). + # @param access [Integer] the level of access requested (default is maximum). # # @return [String, nil] the handle of the service opened, or nil on failure. def openservicew(scm_handle, service_name, access = SERVICE_ALL_ACCESS) @@ -208,8 +208,8 @@ class Client # it. Returns true on success, or false. # # @param svc_handle [String] the handle of the service (from {#openservicew}). - # @param magic1 [Fixnum] an unknown value. - # @param magic2 [Fixnum] another unknown value. + # @param magic1 [Integer] an unknown value. + # @param magic2 [Integer] another unknown value. # # @return [Integer] Windows error code def startservice(svc_handle, magic1 = 0, magic2 = 0) @@ -240,7 +240,7 @@ class Client # Controls an existing service. # # @param svc_handle [String] the handle of the service (from {#openservicew}). - # @param operation [Fixnum] the operation number to perform (1 = stop + # @param operation [Integer] the operation number to perform (1 = stop # service; others are unknown). # # @return [Integer] Windows error code @@ -281,7 +281,7 @@ class Client # # @param svc_handle [String] the handle of the service (from {#openservicew}). # - # @return [Fixnum] Returns 0 if the query failed (i.e.: a state was returned + # @return [Integer] Returns 0 if the query failed (i.e.: a state was returned # that isn't implemented), 1 if the service is running, and # 2 if the service is stopped. def queryservice(svc_handle) diff --git a/lib/rex/proto/http/client.rb b/lib/rex/proto/http/client.rb index 1dc097b0db..cb1c245860 100644 --- a/lib/rex/proto/http/client.rb +++ b/lib/rex/proto/http/client.rb @@ -159,7 +159,7 @@ class Client # # Connects to the remote server if possible. # - # @param t [Fixnum] Timeout + # @param t [Integer] Timeout # @see Rex::Socket::Tcp.create # @return [Rex::Socket::Tcp] def connect(t = -1) @@ -250,7 +250,7 @@ class Client # # @param res [Response] the HTTP Response object # @param opts [Hash] the options used to generate the original HTTP request - # @param t [Fixnum] the timeout for the request in seconds + # @param t [Integer] the timeout for the request in seconds # @param persist [Boolean] whether or not to persist the TCP connection (pipelining) # # @return [Response] the last valid HTTP response object we received diff --git a/lib/rex/proto/kerberos/client.rb b/lib/rex/proto/kerberos/client.rb index 5e6e6abc37..be3600b9e9 100644 --- a/lib/rex/proto/kerberos/client.rb +++ b/lib/rex/proto/kerberos/client.rb @@ -9,10 +9,10 @@ module Rex # @return [String] The kerberos server host attr_accessor :host # @!attribute port - # @return [Fixnum] The kerberos server port + # @return [Integer] The kerberos server port attr_accessor :port # @!attribute timeout - # @return [Fixnum] The connect / read timeout + # @return [Integer] The connect / read timeout attr_accessor :timeout # @todo Support UDP # @!attribute protocol @@ -65,7 +65,7 @@ module Rex # Sends a kerberos request through the connection # # @param req [Rex::Proto::Kerberos::Model::KdcRequest] the request to send - # @return [Fixnum] the number of bytes sent + # @return [Integer] the number of bytes sent # @raise [RuntimeError] if the transport protocol is unknown # @raise [NotImplementedError] if the transport protocol isn't supported def send_request(req) @@ -139,7 +139,7 @@ module Rex # Sends a Kerberos Request over a tcp connection # # @param req [Rex::Proto::Kerberos::Model::KdcRequest] the request to send - # @return [Fixnum] the number of bytes sent + # @return [Integer] the number of bytes sent # @raise [RuntimeError] if the request can't be encoded def send_request_tcp(req) data = req.encode diff --git a/lib/rex/proto/kerberos/credential_cache/cache.rb b/lib/rex/proto/kerberos/credential_cache/cache.rb index 6953050029..19d755ffaa 100644 --- a/lib/rex/proto/kerberos/credential_cache/cache.rb +++ b/lib/rex/proto/kerberos/credential_cache/cache.rb @@ -8,7 +8,7 @@ module Rex class Cache < Element # @!attribute version - # @return [Fixnum] The file format version + # @return [Integer] The file format version attr_accessor :version # @!attribute headers # @return [Array] The header tags diff --git a/lib/rex/proto/kerberos/credential_cache/credential.rb b/lib/rex/proto/kerberos/credential_cache/credential.rb index 3b9ecd8db3..c6ce335a10 100644 --- a/lib/rex/proto/kerberos/credential_cache/credential.rb +++ b/lib/rex/proto/kerberos/credential_cache/credential.rb @@ -19,10 +19,10 @@ module Rex # @return [Rex::Proto::Kerberos::CredentialCache::Time] attr_accessor :time # @!attribute is_skey - # @return [Fixnum] + # @return [Integer] attr_accessor :is_skey # @!attribute tkt_flags - # @return [Fixnum] + # @return [Integer] attr_accessor :tkt_flags # @!attribute addrs # @return [Array] diff --git a/lib/rex/proto/kerberos/credential_cache/key_block.rb b/lib/rex/proto/kerberos/credential_cache/key_block.rb index 0a58688216..9db50bf4e4 100644 --- a/lib/rex/proto/kerberos/credential_cache/key_block.rb +++ b/lib/rex/proto/kerberos/credential_cache/key_block.rb @@ -8,10 +8,10 @@ module Rex # This class provides a representation of a credential keys stored in the Kerberos Credential Cache. class KeyBlock < Element # @!attribute key_type - # @return [Fixnum] + # @return [Integer] attr_accessor :key_type # @!attribute e_type - # @return [Fixnum] + # @return [Integer] attr_accessor :e_type # @!attribute key_value # @return [String] diff --git a/lib/rex/proto/kerberos/credential_cache/principal.rb b/lib/rex/proto/kerberos/credential_cache/principal.rb index fee17cec48..9665ea3008 100644 --- a/lib/rex/proto/kerberos/credential_cache/principal.rb +++ b/lib/rex/proto/kerberos/credential_cache/principal.rb @@ -7,7 +7,7 @@ module Rex # This class provides a representation of a Principal stored in the Kerberos Credential Cache. class Principal < Element # @!attribute name_type - # @return [Fixnum] + # @return [Integer] attr_accessor :name_type # @!attribute realm # @return [String] diff --git a/lib/rex/proto/kerberos/credential_cache/time.rb b/lib/rex/proto/kerberos/credential_cache/time.rb index 2f9d586ae2..73b5ecc195 100644 --- a/lib/rex/proto/kerberos/credential_cache/time.rb +++ b/lib/rex/proto/kerberos/credential_cache/time.rb @@ -7,16 +7,16 @@ module Rex # This class provides a representation of credential times stored in the Kerberos Credential Cache. class Time < Element # @!attribute auth_time - # @return [Fixnum] + # @return [Integer] attr_accessor :auth_time # @!attribute start_time - # @return [Fixnum] + # @return [Integer] attr_accessor :start_time # @!attribute end_time - # @return [Fixnum] + # @return [Integer] attr_accessor :end_time # @!attribute renew_till - # @return [Fixnum] + # @return [Integer] attr_accessor :renew_till # Encodes the Rex::Proto::Kerberos::CredentialCache::Time into an String diff --git a/lib/rex/proto/kerberos/crypto/rc4_hmac.rb b/lib/rex/proto/kerberos/crypto/rc4_hmac.rb index e413e987fe..fd36db15e5 100644 --- a/lib/rex/proto/kerberos/crypto/rc4_hmac.rb +++ b/lib/rex/proto/kerberos/crypto/rc4_hmac.rb @@ -9,7 +9,7 @@ module Rex # # @param cipher [String] the data to decrypt # @param key [String] the key to decrypt - # @param msg_type [Fixnum] the message type + # @param msg_type [Integer] the message type # @return [String] the decrypted cipher # @raise [RuntimeError] if decryption doesn't succeed def decrypt_rc4_hmac(cipher, key, msg_type) @@ -39,7 +39,7 @@ module Rex # # @param data [String] the data to encrypt # @param key [String] the key to encrypt - # @param msg_type [Fixnum] the message type + # @param msg_type [Integer] the message type # @return [String] the encrypted data def encrypt_rc4_hmac(data, key, msg_type) k1 = OpenSSL::HMAC.digest('MD5', key, [msg_type].pack('V')) diff --git a/lib/rex/proto/kerberos/model/ap_req.rb b/lib/rex/proto/kerberos/model/ap_req.rb index e50896d475..9eff0a2279 100644 --- a/lib/rex/proto/kerberos/model/ap_req.rb +++ b/lib/rex/proto/kerberos/model/ap_req.rb @@ -9,13 +9,13 @@ module Rex # themselves class ApReq < Element # @!attribute pvno - # @return [Fixnum] The protocol version number + # @return [Integer] The protocol version number attr_accessor :pvno # @!attribute msg_type - # @return [Fixnum] The type of the protocol message + # @return [Integer] The type of the protocol message attr_accessor :msg_type # @!attribute options - # @return [Fixnum] request options, affects processing + # @return [Integer] request options, affects processing attr_accessor :options # @!attribute ticket # @return [Rex::Proto::Kerberos::Model::Ticket] The ticket authenticating the client to the server diff --git a/lib/rex/proto/kerberos/model/authenticator.rb b/lib/rex/proto/kerberos/model/authenticator.rb index f849830b99..c9da9e266c 100644 --- a/lib/rex/proto/kerberos/model/authenticator.rb +++ b/lib/rex/proto/kerberos/model/authenticator.rb @@ -9,7 +9,7 @@ module Rex # key in the ticket. class Authenticator < Element # @!attribute vno - # @return [Fixnum] The authenticator version number + # @return [Integer] The authenticator version number attr_accessor :vno # @!attribute crealm # @return [String] The realm in which the client is registered @@ -23,7 +23,7 @@ module Rex # accompanies the KRB_AP_REQ. attr_accessor :checksum # @!attribute cusec - # @return [Fixnum] The microsecond part of the client's timestamp + # @return [Integer] The microsecond part of the client's timestamp attr_accessor :cusec # @!attribute ctime # @return [Time] The current time of the client's host @@ -61,7 +61,7 @@ module Rex # Encrypts the Rex::Proto::Kerberos::Model::Authenticator # - # @param etype [Fixnum] the crypto schema to encrypt + # @param etype [Integer] the crypto schema to encrypt # @param key [String] the key to encrypt # @return [String] the encrypted result # @raise [NotImplementedError] if the encryption schema isn't supported diff --git a/lib/rex/proto/kerberos/model/authorization_data.rb b/lib/rex/proto/kerberos/model/authorization_data.rb index ef8c74990c..a9b2dc4dd8 100644 --- a/lib/rex/proto/kerberos/model/authorization_data.rb +++ b/lib/rex/proto/kerberos/model/authorization_data.rb @@ -8,8 +8,8 @@ module Rex # definition. class AuthorizationData < Element # @!attribute elements - # @return [Hash{Symbol => }] The type of the authorization data - # @option [Fixnum] :type + # @return [Hash{Symbol => }] The type of the authorization data + # @option [Integer] :type # @option [String] :data attr_accessor :elements @@ -41,7 +41,7 @@ module Rex # Encrypts the Rex::Proto::Kerberos::Model::AuthorizationData # - # @param etype [Fixnum] the crypto schema to encrypt + # @param etype [Integer] the crypto schema to encrypt # @param key [String] the key to encrypt # @return [String] the encrypted result # @raise [NotImplementedError] if encryption schema isn't supported diff --git a/lib/rex/proto/kerberos/model/checksum.rb b/lib/rex/proto/kerberos/model/checksum.rb index ccd4f9c6b7..1c5e69a25b 100644 --- a/lib/rex/proto/kerberos/model/checksum.rb +++ b/lib/rex/proto/kerberos/model/checksum.rb @@ -8,7 +8,7 @@ module Rex class Checksum < Element # @!attribute type - # @return [Fixnum] The algorithm used to generate the checksum + # @return [Integer] The algorithm used to generate the checksum attr_accessor :type # @!attribute checksum # @return [String] The checksum itself diff --git a/lib/rex/proto/kerberos/model/enc_kdc_response.rb b/lib/rex/proto/kerberos/model/enc_kdc_response.rb index dd8868f68e..434376f0ab 100644 --- a/lib/rex/proto/kerberos/model/enc_kdc_response.rb +++ b/lib/rex/proto/kerberos/model/enc_kdc_response.rb @@ -13,14 +13,14 @@ module Rex # of the last request by a principal attr_accessor :last_req # @!attribute nonce - # @return [Fixnum] random number + # @return [Integer] random number attr_accessor :nonce # @!attribute key_expiration # @return [Time] The key-expiration field is part of the response from the # KDC and specifies the time that the client's secret key is due to expire attr_accessor :key_expiration # @!attribute flags - # @return [Fixnum] This field indicates which of various options were used or + # @return [Integer] This field indicates which of various options were used or # requested when the ticket was issued attr_accessor :flags # @!attribute auth_time @@ -140,7 +140,7 @@ module Rex # Decodes the nonce field # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_nonce(input) input.value[0].value.to_i end @@ -156,7 +156,7 @@ module Rex # Decodes the flags field # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_flags(input) input.value[0].value.to_i end diff --git a/lib/rex/proto/kerberos/model/encrypted_data.rb b/lib/rex/proto/kerberos/model/encrypted_data.rb index 17425adb35..a34f5c5040 100644 --- a/lib/rex/proto/kerberos/model/encrypted_data.rb +++ b/lib/rex/proto/kerberos/model/encrypted_data.rb @@ -7,10 +7,10 @@ module Rex # This class provides a representation of an encrypted message. class EncryptedData < Element # @!attribute name_type - # @return [Fixnum] The encryption algorithm + # @return [Integer] The encryption algorithm attr_accessor :etype # @!attribute kvno - # @return [Fixnum] The version number of the key + # @return [Integer] The version number of the key attr_accessor :kvno # @!attribute cipher # @return [String] The enciphered text @@ -58,7 +58,7 @@ module Rex # Decrypts the cipher with etype encryption schema # # @param key [String] the key to decrypt - # @param msg_type [Fixnum] the message type + # @param msg_type [Integer] the message type # @return [String] the decrypted `cipher` # @raise [RuntimeError] if decryption doesn't succeed # @raise [NotImplementedError] if encryption isn't supported @@ -143,7 +143,7 @@ module Rex # Decodes the etype from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_etype(input) input.value[0].value.to_i end @@ -151,7 +151,7 @@ module Rex # Decodes the kvno from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_kvno(input) input.value[0].value.to_i end diff --git a/lib/rex/proto/kerberos/model/encryption_key.rb b/lib/rex/proto/kerberos/model/encryption_key.rb index b185d80129..c5d90634cd 100644 --- a/lib/rex/proto/kerberos/model/encryption_key.rb +++ b/lib/rex/proto/kerberos/model/encryption_key.rb @@ -9,7 +9,7 @@ module Rex class EncryptionKey < Element # @!attribute key - # @return [Fixnum] The type of encryption key + # @return [Integer] The type of encryption key attr_accessor :type # @!attribute value # @return [String] the key itself @@ -70,7 +70,7 @@ module Rex # Decodes the type from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_type(input) input.value[0].value.to_i end diff --git a/lib/rex/proto/kerberos/model/kdc_request.rb b/lib/rex/proto/kerberos/model/kdc_request.rb index e54332739e..007a5c22c3 100644 --- a/lib/rex/proto/kerberos/model/kdc_request.rb +++ b/lib/rex/proto/kerberos/model/kdc_request.rb @@ -8,10 +8,10 @@ module Rex # definition class KdcRequest < Element # @!attribute pvno - # @return [Fixnum] The protocol version number + # @return [Integer] The protocol version number attr_accessor :pvno # @!attribute msg_type - # @return [Fixnum] The type of a protocol message + # @return [Integer] The type of a protocol message attr_accessor :msg_type # @!attribute pa_data # @return [Array] Authentication information which may @@ -126,7 +126,7 @@ module Rex # Decodes the pvno from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_asn1_pvno(input) input.value[0].value.to_i end @@ -134,7 +134,7 @@ module Rex # Decodes the msg_type from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_asn1_msg_type(input) input.value[0].value.to_i end diff --git a/lib/rex/proto/kerberos/model/kdc_request_body.rb b/lib/rex/proto/kerberos/model/kdc_request_body.rb index d9f2baacf7..2cdeea536c 100644 --- a/lib/rex/proto/kerberos/model/kdc_request_body.rb +++ b/lib/rex/proto/kerberos/model/kdc_request_body.rb @@ -8,7 +8,7 @@ module Rex # definition class KdcRequestBody < Element # @!attribute options - # @return [Fixnum] The ticket flags + # @return [Integer] The ticket flags attr_accessor :options # @!attribute cname # @return [Rex::Proto::Kerberos::Model::PrincipalName] The name part of the client's principal identifier @@ -29,10 +29,10 @@ module Rex # @return [Time] Optional requested renew-till time attr_accessor :rtime # @!attribute nonce - # @return [Fixnum] random number + # @return [Integer] random number attr_accessor :nonce # @!attribute etype - # @return [Array] The desired encryption algorithm to be used in the response + # @return [Array] The desired encryption algorithm to be used in the response attr_accessor :etype # @!attribute enc_auth_data # @return [Rex::Proto::Kerberos::Model::EncryptedData] An encoding of the desired authorization-data encrypted @@ -80,7 +80,7 @@ module Rex # Makes a checksum from the Rex::Proto::Kerberos::Model::KdcRequestBody # - # @param etype [Fixnum] the crypto schema to checksum + # @param etype [Integer] the crypto schema to checksum # @return [String] the checksum # @raise [NotImplementedError] if the encryption schema isn't supported def checksum(etype) @@ -228,7 +228,7 @@ module Rex # Decodes the options field # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_options(input) input.value[0].value.unpack('N')[0] end @@ -284,7 +284,7 @@ module Rex # Decodes the nonce field # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_nonce(input) input.value[0].value.to_i end @@ -292,7 +292,7 @@ module Rex # Decodes the etype field # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Array] + # @return [Array] def decode_etype(input) encs = [] input.value[0].value.each do |enc| @@ -312,4 +312,4 @@ module Rex end end end -end \ No newline at end of file +end diff --git a/lib/rex/proto/kerberos/model/kdc_response.rb b/lib/rex/proto/kerberos/model/kdc_response.rb index 02c119d5b7..ce63d5d42d 100644 --- a/lib/rex/proto/kerberos/model/kdc_response.rb +++ b/lib/rex/proto/kerberos/model/kdc_response.rb @@ -8,10 +8,10 @@ module Rex # definition class KdcResponse < Element # @!attribute pvno - # @return [Fixnum] The protocol version number + # @return [Integer] The protocol version number attr_accessor :pvno # @!attribute msg_type - # @return [Fixnum] The type of a protocol message + # @return [Integer] The type of a protocol message attr_accessor :msg_type # @!attribute crealm # @return [String] The realm part of the client's principal identifier @@ -90,7 +90,7 @@ module Rex # Decodes the pvno from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_pvno(input) input.value[0].value.to_i end @@ -98,7 +98,7 @@ module Rex # Decodes the msg_type from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_msg_type(input) input.value[0].value.to_i end diff --git a/lib/rex/proto/kerberos/model/krb_error.rb b/lib/rex/proto/kerberos/model/krb_error.rb index e20772e86d..bcd24e0946 100644 --- a/lib/rex/proto/kerberos/model/krb_error.rb +++ b/lib/rex/proto/kerberos/model/krb_error.rb @@ -8,25 +8,25 @@ module Rex # message definition. class KrbError < Element # @!attribute pvno - # @return [Fixnum] The protocol version number + # @return [Integer] The protocol version number attr_accessor :pvno # @!attribute msg_type - # @return [Fixnum] The type of a protocol message + # @return [Integer] The type of a protocol message attr_accessor :msg_type # @!attribute ctime # @return [Time] The current time of the client's host attr_accessor :ctime # @!attribute cusec - # @return [Fixnum] The microseconds part of the client timestamp + # @return [Integer] The microseconds part of the client timestamp attr_accessor :cusec # @!attribute stime # @return [Time] The current time of the server attr_accessor :stime # @!attribute susec - # @return [Fixnum] The microseconds part of the server timestamp + # @return [Integer] The microseconds part of the server timestamp attr_accessor :susec # @!attribute error_code - # @return [Fixnum] The error request returned by kerberos or the server when a request fails + # @return [Integer] The error request returned by kerberos or the server when a request fails attr_accessor :error_code # @!attribute crealm # @return [String] The realm part of the client's principal identifier @@ -120,7 +120,7 @@ module Rex # Decodes the pvno from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_pvno(input) input.value[0].value.to_i end @@ -128,7 +128,7 @@ module Rex # Decodes the msg_type from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_msg_type(input) input.value[0].value.to_i end @@ -144,7 +144,7 @@ module Rex # Decodes the cusec field # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_cusec(input) input.value[0].value end @@ -160,7 +160,7 @@ module Rex # Decodes the susec field # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_susec(input) input.value[0].value.to_i end @@ -168,7 +168,7 @@ module Rex # Decodes the error_code field # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_error_code(input) input.value[0].value.to_i end diff --git a/lib/rex/proto/kerberos/model/last_request.rb b/lib/rex/proto/kerberos/model/last_request.rb index cd9bdd4837..fcb551b832 100644 --- a/lib/rex/proto/kerberos/model/last_request.rb +++ b/lib/rex/proto/kerberos/model/last_request.rb @@ -8,7 +8,7 @@ module Rex class LastRequest < Element # @!attribute type - # @return [Fixnum] The type of value + # @return [Integer] The type of value attr_accessor :type # @!attribute value # @return [Time] the time of the last request @@ -63,7 +63,7 @@ module Rex # Decodes the key_type from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_type(input) input.value[0].value.to_i end diff --git a/lib/rex/proto/kerberos/model/pre_auth_data.rb b/lib/rex/proto/kerberos/model/pre_auth_data.rb index f96c6618e4..a9b5492156 100644 --- a/lib/rex/proto/kerberos/model/pre_auth_data.rb +++ b/lib/rex/proto/kerberos/model/pre_auth_data.rb @@ -9,7 +9,7 @@ module Rex class PreAuthData < Element # @!attribute type - # @return [Fixnum] The padata type + # @return [Integer] The padata type attr_accessor :type # @!attribute value # @return [String] The padata value @@ -85,7 +85,7 @@ module Rex # Decodes the type from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_asn1_type(input) input.value[0].value.to_i end @@ -93,7 +93,7 @@ module Rex # Decodes the value from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_asn1_value(input) input.value[0].value end diff --git a/lib/rex/proto/kerberos/model/pre_auth_enc_time_stamp.rb b/lib/rex/proto/kerberos/model/pre_auth_enc_time_stamp.rb index 76415db244..220cab825a 100644 --- a/lib/rex/proto/kerberos/model/pre_auth_enc_time_stamp.rb +++ b/lib/rex/proto/kerberos/model/pre_auth_enc_time_stamp.rb @@ -14,7 +14,7 @@ module Rex # @return [Time] client's time attr_accessor :pa_time_stamp # @!attribute pausec - # @return [Fixnum] optional microseconds client's time + # @return [Integer] optional microseconds client's time attr_accessor :pausec # Decodes a Rex::Proto::Kerberos::Model::PreAuthEncTimeStamp @@ -49,7 +49,7 @@ module Rex # Encrypts the Rex::Proto::Kerberos::Model::PreAuthEncTimeStamp # - # @param etype [Fixnum] the crypto schema to encrypt + # @param etype [Integer] the crypto schema to encrypt # @param key [String] the key to encrypt # @return [String] the encrypted result # @raise [NotImplementedError] if encryption schema isn't supported @@ -115,7 +115,7 @@ module Rex # Decodes the pausec from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_pausec(input) input.value[0].value.to_i end diff --git a/lib/rex/proto/kerberos/model/principal_name.rb b/lib/rex/proto/kerberos/model/principal_name.rb index 51067f5c5c..a07c43b2fd 100644 --- a/lib/rex/proto/kerberos/model/principal_name.rb +++ b/lib/rex/proto/kerberos/model/principal_name.rb @@ -9,7 +9,7 @@ module Rex class PrincipalName < Element # @!attribute name_type - # @return [Fixnum] The type of name + # @return [Integer] The type of name attr_accessor :name_type # @!attribute name_string # @return [Array] A sequence of strings that form a name. @@ -92,7 +92,7 @@ module Rex # Decodes the name_type from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_name_type(input) input.value[0].value.to_i end diff --git a/lib/rex/proto/kerberos/model/ticket.rb b/lib/rex/proto/kerberos/model/ticket.rb index de43199b89..1f9536f697 100644 --- a/lib/rex/proto/kerberos/model/ticket.rb +++ b/lib/rex/proto/kerberos/model/ticket.rb @@ -8,7 +8,7 @@ module Rex # a client authenticate to a service. class Ticket < Element # @!attribute tkt_vno - # @return [Fixnum] The ticket version number + # @return [Integer] The ticket version number attr_accessor :tkt_vno # @!attribute realm # @return [String] The realm that issued the ticket @@ -117,7 +117,7 @@ module Rex # Decodes the tkt_vno from an OpenSSL::ASN1::ASN1Data # # @param input [OpenSSL::ASN1::ASN1Data] the input to decode from - # @return [Fixnum] + # @return [Integer] def decode_tkt_vno(input) input.value[0].value.to_i end diff --git a/lib/rex/proto/kerberos/pac/logon_info.rb b/lib/rex/proto/kerberos/pac/logon_info.rb index 434279a013..ccd7ac0a12 100644 --- a/lib/rex/proto/kerberos/pac/logon_info.rb +++ b/lib/rex/proto/kerberos/pac/logon_info.rb @@ -16,13 +16,13 @@ module Rex # @return [String] The client's Windows 2000 user name attr_accessor :effective_name # @!attribute user_id - # @return [Fixnum] The relative ID for the client + # @return [Integer] The relative ID for the client attr_accessor :user_id # @!attribute primary_group_id - # @return [Fixnum] The relative ID for the client's primary group + # @return [Integer] The relative ID for the client's primary group attr_accessor :primary_group_id # @!attribute group_ids - # @return [Array] Array of relative Ids of the groups which the client is a member + # @return [Array] Array of relative Ids of the groups which the client is a member attr_accessor :group_ids # @!attribute logon_domain_name # @return [String] The netbios name of the client's domain diff --git a/lib/rex/proto/kerberos/pac/priv_svr_checksum.rb b/lib/rex/proto/kerberos/pac/priv_svr_checksum.rb index cb3b8ecd43..c1a0105316 100644 --- a/lib/rex/proto/kerberos/pac/priv_svr_checksum.rb +++ b/lib/rex/proto/kerberos/pac/priv_svr_checksum.rb @@ -9,7 +9,7 @@ module Rex class PrivSvrChecksum < Element # @!attribute version - # @return [Fixnum] The checksum type + # @return [Integer] The checksum type attr_accessor :checksum # Encodes the Rex::Proto::Kerberos::Pac::PacPrivSvrChecksum diff --git a/lib/rex/proto/kerberos/pac/server_checksum.rb b/lib/rex/proto/kerberos/pac/server_checksum.rb index f155ee181f..7841a6a149 100644 --- a/lib/rex/proto/kerberos/pac/server_checksum.rb +++ b/lib/rex/proto/kerberos/pac/server_checksum.rb @@ -9,7 +9,7 @@ module Rex class ServerChecksum < Element # @!attribute version - # @return [Fixnum] The checksum type + # @return [Integer] The checksum type attr_accessor :checksum # Encodes the Rex::Proto::Kerberos::Pac::ServerChecksum diff --git a/lib/rex/proto/kerberos/pac/type.rb b/lib/rex/proto/kerberos/pac/type.rb index 980461ea02..b759f126b8 100644 --- a/lib/rex/proto/kerberos/pac/type.rb +++ b/lib/rex/proto/kerberos/pac/type.rb @@ -12,7 +12,7 @@ module Rex # @return [Array] The array of PAC_INFO_BUFFER structures attr_accessor :buffers # @!attribute checksum - # @return [Fixnum] The type of checksum to use when encoding PAC-TYPE + # @return [Integer] The type of checksum to use when encoding PAC-TYPE attr_accessor :checksum # Encodes the Rex::Proto::Kerberos::Pac::Type diff --git a/lib/rex/proto/pjl/client.rb b/lib/rex/proto/pjl/client.rb index 66902b2b41..f49ebf240d 100644 --- a/lib/rex/proto/pjl/client.rb +++ b/lib/rex/proto/pjl/client.rb @@ -139,7 +139,7 @@ class Client # List a directory # # @param path [String] Remote path - # @param count [Fixnum] Number of entries to list + # @param count [Integer] Number of entries to list # @return [String] Directory listing def fsdirlist(path, count = COUNT_MAX) if path !~ /^[0-2]:/ diff --git a/lib/rex/proto/rmi/model/call.rb b/lib/rex/proto/rmi/model/call.rb index f78dd74e8b..2cd5b52192 100644 --- a/lib/rex/proto/rmi/model/call.rb +++ b/lib/rex/proto/rmi/model/call.rb @@ -8,7 +8,7 @@ module Rex class Call < Element # @!attribute message_id - # @return [Fixnum] the message id + # @return [Integer] the message id attr_accessor :message_id # @!attribute call_data # @return [Rex::Proto::Rmi::Model::CallData] the call data diff --git a/lib/rex/proto/rmi/model/call_data.rb b/lib/rex/proto/rmi/model/call_data.rb index a6e6aecab4..3b964df406 100644 --- a/lib/rex/proto/rmi/model/call_data.rb +++ b/lib/rex/proto/rmi/model/call_data.rb @@ -8,17 +8,17 @@ module Rex class CallData < Element # @!attribute object_number - # @return [Fixnum] Random to identify the object being called + # @return [Integer] Random to identify the object being called attr_accessor :object_number # @!attribute uid # @return [Rex::Proto::Rmi::Model::UniqueIdentifier] unique identifier for the target to call attr_accessor :uid # @!attribute operation - # @return [Fixnum] On JDK 1.1 stub protocol the operation index in the interface. On JDK 1.2 + # @return [Integer] On JDK 1.1 stub protocol the operation index in the interface. On JDK 1.2 # it is -1. attr_accessor :operation # @!attribute hash - # @return [Fixnum] On JDK 1.1 stub protocol the stub's interface hash. On JDK1.2 is a hash + # @return [Integer] On JDK 1.1 stub protocol the stub's interface hash. On JDK1.2 is a hash # representing the method to call. attr_accessor :hash # @!attribute arguments @@ -66,7 +66,7 @@ module Rex # Reads the object number from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_object_number(io) object_number = read_long(io) @@ -86,7 +86,7 @@ module Rex # Reads the operation from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_operation(io) operation = read_int(io) @@ -96,7 +96,7 @@ module Rex # Reads the hash from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_hash(io) hash = read_long(io) diff --git a/lib/rex/proto/rmi/model/continuation.rb b/lib/rex/proto/rmi/model/continuation.rb index e7e801c4ad..bdb62323ec 100644 --- a/lib/rex/proto/rmi/model/continuation.rb +++ b/lib/rex/proto/rmi/model/continuation.rb @@ -8,13 +8,13 @@ module Rex class Continuation < Element # @!attribute length - # @return [Fixnum] the end point address length + # @return [Integer] the end point address length attr_accessor :length # @!attribute address # @return [String] the end point address attr_accessor :address # @!attribute port - # @return [Fixnum] the end point port + # @return [Integer] the end point port attr_accessor :port private @@ -22,7 +22,7 @@ module Rex # Reads the end point identifier address length from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_length(io) length = read_short(io) @@ -42,7 +42,7 @@ module Rex # Reads the end point port from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_port(io) port = read_int(io) diff --git a/lib/rex/proto/rmi/model/dgc_ack.rb b/lib/rex/proto/rmi/model/dgc_ack.rb index 1edcb81bfc..53f9e5fdd0 100644 --- a/lib/rex/proto/rmi/model/dgc_ack.rb +++ b/lib/rex/proto/rmi/model/dgc_ack.rb @@ -10,7 +10,7 @@ module Rex class DgcAck < Element # @!attribute stream_id - # @return [Fixnum] the input stream id + # @return [Integer] the input stream id attr_accessor :stream_id # @!attribute unique_identifier # @return [String] the unique identifier diff --git a/lib/rex/proto/rmi/model/element.rb b/lib/rex/proto/rmi/model/element.rb index f9dbd3f78a..caadb26050 100644 --- a/lib/rex/proto/rmi/model/element.rb +++ b/lib/rex/proto/rmi/model/element.rb @@ -82,7 +82,7 @@ module Rex # Reads a byte from an IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] # @raise [Rex::Proto::Rmi::DecodeError] if the byte can't be read from io def read_byte(io) raw = io.read(1) @@ -94,7 +94,7 @@ module Rex # Reads a two bytes short from an IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] # @raise [Rex::Proto::Rmi::DecodeError] if the short can't be read from io def read_short(io) raw = io.read(2) @@ -109,7 +109,7 @@ module Rex # Reads a four bytes int from an IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] # @raise [Rex::Proto::Rmi::DecodeError] if the int can't be read from io def read_int(io) raw = io.read(4) @@ -124,7 +124,7 @@ module Rex # Reads a 8 bytes long from an IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] # @raise [Rex::Proto::Rmi::DecodeError] if the long can't be read from io def read_long(io) raw = io.read(8) @@ -139,7 +139,7 @@ module Rex # Reads an string from an IO # # @param io [IO] the IO to read from - # @param length [Fixnum] the string length + # @param length [Integer] the string length # @return [String] # @raise [Rex::Proto::Rmi::DecodeError] if the string can't be read from io def read_string(io, length) diff --git a/lib/rex/proto/rmi/model/output_header.rb b/lib/rex/proto/rmi/model/output_header.rb index 4e430ec977..497cd8776b 100644 --- a/lib/rex/proto/rmi/model/output_header.rb +++ b/lib/rex/proto/rmi/model/output_header.rb @@ -11,10 +11,10 @@ module Rex # @return [String] the Java RMI header signature attr_accessor :signature # @!attribute version - # @return [Fixnum] the Java RMI version + # @return [Integer] the Java RMI version attr_accessor :version # @!attribute protocol - # @return [Fixnum] the protocol where the the messages are wrapped within + # @return [Integer] the protocol where the the messages are wrapped within attr_accessor :protocol private @@ -36,7 +36,7 @@ module Rex # Reads the version from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_version(io) version = read_short(io) @@ -46,7 +46,7 @@ module Rex # Reads the protocol from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] # @raise [Rex::Proto::Rmi::DecodeError] if fails to decode the protocol def decode_protocol(io) valid_protocols = [STREAM_PROTOCOL, SINGLE_OP_PROTOCOL, MULTIPLEX_PROTOCOL] diff --git a/lib/rex/proto/rmi/model/ping.rb b/lib/rex/proto/rmi/model/ping.rb index 860cc99748..7b5ed07bbf 100644 --- a/lib/rex/proto/rmi/model/ping.rb +++ b/lib/rex/proto/rmi/model/ping.rb @@ -9,7 +9,7 @@ module Rex class Ping < Element # @!attribute stream_id - # @return [Fixnum] the input stream id + # @return [Integer] the input stream id attr_accessor :stream_id private diff --git a/lib/rex/proto/rmi/model/ping_ack.rb b/lib/rex/proto/rmi/model/ping_ack.rb index 5beb3c1215..8b674ffa7f 100644 --- a/lib/rex/proto/rmi/model/ping_ack.rb +++ b/lib/rex/proto/rmi/model/ping_ack.rb @@ -9,7 +9,7 @@ module Rex class PingAck < Element # @!attribute stream_id - # @return [Fixnum] the input stream id + # @return [Integer] the input stream id attr_accessor :stream_id private diff --git a/lib/rex/proto/rmi/model/protocol_ack.rb b/lib/rex/proto/rmi/model/protocol_ack.rb index 888da6c4c0..f5635e75ab 100644 --- a/lib/rex/proto/rmi/model/protocol_ack.rb +++ b/lib/rex/proto/rmi/model/protocol_ack.rb @@ -8,16 +8,16 @@ module Rex class ProtocolAck < Element # @!attribute stream_id - # @return [Fixnum] the input stream id + # @return [Integer] the input stream id attr_accessor :stream_id # @!attribute length - # @return [Fixnum] the end point address length + # @return [Integer] the end point address length attr_accessor :length # @!attribute address # @return [String] the end point address attr_accessor :address # @!attribute port - # @return [Fixnum] the end point port + # @return [Integer] the end point port attr_accessor :port private @@ -39,7 +39,7 @@ module Rex # Reads the end point identifier address length from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_length(io) length = read_short(io) @@ -59,7 +59,7 @@ module Rex # Reads the end point port from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_port(io) port = read_int(io) diff --git a/lib/rex/proto/rmi/model/return_data.rb b/lib/rex/proto/rmi/model/return_data.rb index 8ac40c3290..b8ff4c2341 100644 --- a/lib/rex/proto/rmi/model/return_data.rb +++ b/lib/rex/proto/rmi/model/return_data.rb @@ -8,7 +8,7 @@ module Rex class ReturnData < Element # @!attribute stream_id - # @return [Fixnum] the stream id + # @return [Integer] the stream id attr_accessor :stream_id # @!attribute return value # @return [Rex::Proto::Rmi::Model::ReturnValue] the return value diff --git a/lib/rex/proto/rmi/model/return_value.rb b/lib/rex/proto/rmi/model/return_value.rb index 984df31267..41ea219fe4 100644 --- a/lib/rex/proto/rmi/model/return_value.rb +++ b/lib/rex/proto/rmi/model/return_value.rb @@ -8,7 +8,7 @@ module Rex class ReturnValue < Element # @!attribute code - # @return [Fixnum] the return code + # @return [Integer] the return code attr_accessor :code # @!attribute uid # @return [Rex::Proto::Rmi::Model::UniqueIdentifier] unique identifier of the returned value diff --git a/lib/rex/proto/rmi/model/unique_identifier.rb b/lib/rex/proto/rmi/model/unique_identifier.rb index 179f162c43..9b0f3d675f 100644 --- a/lib/rex/proto/rmi/model/unique_identifier.rb +++ b/lib/rex/proto/rmi/model/unique_identifier.rb @@ -8,13 +8,13 @@ module Rex class UniqueIdentifier < Element # @!attribute number - # @return [Fixnum] Identifies the VM where an object is generated + # @return [Integer] Identifies the VM where an object is generated attr_accessor :number # @!attribute time - # @return [Fixnum] Time where the object was generated + # @return [Integer] Time where the object was generated attr_accessor :time # @!attribute count - # @return [Fixnum] Identifies different instance of the same object generated from the same VM + # @return [Integer] Identifies different instance of the same object generated from the same VM # at the same time attr_accessor :count @@ -23,7 +23,7 @@ module Rex # Reads the number from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_number(io) number = read_int(io) @@ -33,7 +33,7 @@ module Rex # Reads the time from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_time(io) time = read_long(io) @@ -43,7 +43,7 @@ module Rex # Reads the count from the IO # # @param io [IO] the IO to read from - # @return [Fixnum] + # @return [Integer] def decode_count(io) count = read_short(io) diff --git a/lib/rex/proto/steam/message.rb b/lib/rex/proto/steam/message.rb index 866f7014e1..d8677c4e66 100644 --- a/lib/rex/proto/steam/message.rb +++ b/lib/rex/proto/steam/message.rb @@ -28,16 +28,16 @@ module Steam # Encodes a Steam message. # - # @param type [String, Fixnum] the message type + # @param type [String, Integer] the message type # @param body [String] the message body # @return [String] the encoded Steam message def encode_message(type, body) - if type.is_a? Fixnum + if type.is_a? Integer type_num = type elsif type.is_a? String type_num = type.ord else - fail ArgumentError, 'type must be a String or Fixnum' + fail ArgumentError, 'type must be a String or Integer' end [UNFRAGMENTED_HEADER, type_num ].pack('NC') + body diff --git a/lib/snmp/ber.rb b/lib/snmp/ber.rb index b750acd3b6..fbd7c04b96 100644 --- a/lib/snmp/ber.rb +++ b/lib/snmp/ber.rb @@ -8,11 +8,11 @@ # # -# Add ord method to Fixnum for forward compatibility with Ruby 1.9 +# Add ord method to Integer for forward compatibility with Ruby 1.9 # -if "a"[0].kind_of? Fixnum - unless Fixnum.methods.include? :ord - class Fixnum +if "a"[0].kind_of? Integer + unless Integer.methods.include? :ord + class Integer def ord; self; end end end diff --git a/lib/snmp/varbind.rb b/lib/snmp/varbind.rb index 6f1e2e8701..5ceba000b3 100644 --- a/lib/snmp/varbind.rb +++ b/lib/snmp/varbind.rb @@ -77,7 +77,7 @@ class Integer end def coerce(other) - if other.kind_of? Fixnum + if other.kind_of? Integer return [other, @value] else return [other.to_f, self.to_f] diff --git a/modules/auxiliary/admin/http/wp_wplms_privilege_escalation.rb b/modules/auxiliary/admin/http/wp_wplms_privilege_escalation.rb index e60e2c2049..24e7095daa 100644 --- a/modules/auxiliary/admin/http/wp_wplms_privilege_escalation.rb +++ b/modules/auxiliary/admin/http/wp_wplms_privilege_escalation.rb @@ -61,7 +61,7 @@ class MetasploitModule < Msf::Auxiliary case value when String, Symbol "s:#{value.bytesize}:\"#{value}\";" - when Fixnum + when Integer "i:#{value};" end end diff --git a/modules/auxiliary/spoof/llmnr/llmnr_response.rb b/modules/auxiliary/spoof/llmnr/llmnr_response.rb index 5b604415fb..136f0963cf 100644 --- a/modules/auxiliary/spoof/llmnr/llmnr_response.rb +++ b/modules/auxiliary/spoof/llmnr/llmnr_response.rb @@ -79,7 +79,7 @@ attr_accessor :sock, :thread print_good("#{rhost.to_s.ljust 16} llmnr - #{name} matches regex, responding with #{datastore['SPOOFIP']}") end - # qType is not a Fixnum, so to compare it with `case` we have to + # qType is not a Integer, so to compare it with `case` we have to # convert it case question.qType.to_i when ::Net::DNS::A diff --git a/modules/exploits/multi/http/sonicwall_scrutinizer_methoddetail_sqli.rb b/modules/exploits/multi/http/sonicwall_scrutinizer_methoddetail_sqli.rb index 2a3abeb8af..3068d243de 100644 --- a/modules/exploits/multi/http/sonicwall_scrutinizer_methoddetail_sqli.rb +++ b/modules/exploits/multi/http/sonicwall_scrutinizer_methoddetail_sqli.rb @@ -93,7 +93,7 @@ class MetasploitModule < Msf::Exploit::Remote # Pads NULL columns for a SQL injection string. # - # @param n [Fixnum] Number of nulls + # @param n [Integer] Number of nulls # @return [String] def pad_null(n) padding = [] diff --git a/modules/exploits/multi/misc/java_jdwp_debugger.rb b/modules/exploits/multi/misc/java_jdwp_debugger.rb index 412626afd9..3bdc76fb11 100644 --- a/modules/exploits/multi/misc/java_jdwp_debugger.rb +++ b/modules/exploits/multi/misc/java_jdwp_debugger.rb @@ -229,7 +229,7 @@ class MetasploitModule < Msf::Exploit::Remote ret end - # Pack Fixnum for JDWP protocol + # Pack Integer for JDWP protocol def format(fmt, value) if fmt == "L" || fmt == 8 return [value].pack('Q>') @@ -240,7 +240,7 @@ class MetasploitModule < Msf::Exploit::Remote fail_with(Failure::Unknown, "Unknown format") end - # Unpack Fixnum from JDWP protocol + # Unpack Integer from JDWP protocol def unformat(fmt, value) if fmt == "L" || fmt == 8 return value[0..7].unpack('Q>')[0] diff --git a/modules/exploits/windows/fileformat/fdm_torrent.rb b/modules/exploits/windows/fileformat/fdm_torrent.rb index 835441a161..3d0a508665 100644 --- a/modules/exploits/windows/fileformat/fdm_torrent.rb +++ b/modules/exploits/windows/fileformat/fdm_torrent.rb @@ -109,7 +109,7 @@ class MetasploitModule < Msf::Exploit::Remote def bencode_item(item) case item - when Fixnum + when Integer return bencode_int(item) when String return bencode_string(item) diff --git a/modules/post/windows/capture/keylog_recorder.rb b/modules/post/windows/capture/keylog_recorder.rb index a30da1309b..4190bf88d6 100644 --- a/modules/post/windows/capture/keylog_recorder.rb +++ b/modules/post/windows/capture/keylog_recorder.rb @@ -149,7 +149,7 @@ class MetasploitModule < Msf::Post # It will make sure that the process has a visible user meaning that the session has rights to that process. # Note: "target_pid = session.sys.process[proc_name]" will not work when "include Msf::Post::Windows::Priv" is in the module. # - # @return [Fixnum] the PID if one is found + # @return [Integer] the PID if one is found # @return [NilClass] if no PID was found def get_pid(proc_name) processes = client.sys.process.get_processes diff --git a/modules/post/windows/gather/credentials/vnc.rb b/modules/post/windows/gather/credentials/vnc.rb index 5229692c3a..93d3ca7714 100644 --- a/modules/post/windows/gather/credentials/vnc.rb +++ b/modules/post/windows/gather/credentials/vnc.rb @@ -66,7 +66,7 @@ class MetasploitModule < Msf::Post open_key = session.sys.registry.open_key(root_key,base_key,KEY_READ) data = open_key.query_value(variable).data - if data.class == Fixnum + if data.kind_of? Integer return data else value = data.unpack('H*')[0].to_s diff --git a/modules/post/windows/manage/priv_migrate.rb b/modules/post/windows/manage/priv_migrate.rb index 8030f78575..7dc277e31d 100644 --- a/modules/post/windows/manage/priv_migrate.rb +++ b/modules/post/windows/manage/priv_migrate.rb @@ -56,7 +56,7 @@ class MetasploitModule < Msf::Post # It will make sure that the process has a visible user meaning that the session has rights to that process. # Note: "target_pid = session.sys.process[proc_name]" will not work when "include Msf::Post::Windows::Priv" is in the module. # - # @return [Fixnum] the PID if one is found + # @return [Integer] the PID if one is found # @return [NilClass] if no PID was found def get_pid(proc_name) processes = client.sys.process.get_processes @@ -170,7 +170,7 @@ class MetasploitModule < Msf::Post # This function will attempt to spawn a new process of the type provided by the name. # - # @return [Fixnum] the PID if the process spawned successfully + # @return [Integer] the PID if the process spawned successfully # @return [NilClass] if the spawn failed def spawn(proc_name) begin diff --git a/plugins/wiki.rb b/plugins/wiki.rb index c8131e4cc6..aac1064c53 100644 --- a/plugins/wiki.rb +++ b/plugins/wiki.rb @@ -218,7 +218,7 @@ class Plugin::Wiki < Msf::Plugin # Outputs credentials in the database (within the current workspace) as a Rex table object # @param [Hash] opts # @option opts [Array] :hosts contains list of hosts used to limit results - # @option opts [Array] :ports contains list of ports used to limit results + # @option opts [Array] :ports contains list of ports used to limit results # @option opts [String] :search limits results to those containing a provided string # @return [Rex::Text::Table] table containing credentials # diff --git a/spec/lib/msf/core/exploit/kerberos/client/as_response_spec.rb b/spec/lib/msf/core/exploit/kerberos/client/as_response_spec.rb index fa20d13370..88d6e04628 100644 --- a/spec/lib/msf/core/exploit/kerberos/client/as_response_spec.rb +++ b/spec/lib/msf/core/exploit/kerberos/client/as_response_spec.rb @@ -172,7 +172,7 @@ RSpec.describe Msf::Exploit::Remote::Kerberos::Client::AsResponse do context "when using a valid key" do it "returns the extracted Rex::Proto::Kerberos::CredentialCache::Cache" do response = Rex::Proto::Kerberos::Model::KdcResponse.decode(as_response) - expect(subject.extract_logon_time(response, valid_key)).to be_a(Fixnum) + expect(subject.extract_logon_time(response, valid_key)).to be_a(Integer) end it "extracts the correct time" do diff --git a/spec/lib/net/dns/names/names_spec.rb b/spec/lib/net/dns/names/names_spec.rb index 96ea39a86f..48b9f992e5 100644 --- a/spec/lib/net/dns/names/names_spec.rb +++ b/spec/lib/net/dns/names/names_spec.rb @@ -99,7 +99,7 @@ RSpec.describe Net::DNS::Names do v = subject.dn_comp(name, offset, compnames) expect(v.length).to eq(3) expect(v[0]).to be_kind_of(String) - expect(v[1]).to be_kind_of(Fixnum) + expect(v[1]).to be_kind_of(Integer) expect(v[2]).to be_kind_of(Hash) end end diff --git a/spec/lib/net/dns/rr/classes_spec.rb b/spec/lib/net/dns/rr/classes_spec.rb index 5bdd535e95..ef8981ea37 100644 --- a/spec/lib/net/dns/rr/classes_spec.rb +++ b/spec/lib/net/dns/rr/classes_spec.rb @@ -31,13 +31,13 @@ RSpec.describe Net::DNS::RR::Classes do expect(rr_class.to_s).to eql('NONE') end - it 'initializes with a valid RR class Fixnum argument' do + it 'initializes with a valid RR class Integer argument' do rr_class.send(:initialize, 4) expect(rr_class.to_i).to eql(4) expect(rr_class.to_s).to eql('HS') end - it 'raises when the supplied RR class Fixnum is invalid' do + it 'raises when the supplied RR class Integer is invalid' do expect { rr_class.send(:initialize, 123456) }.to raise_error(ClassArgumentError) expect { rr_class.send(:initialize, -1) }.to raise_error(ClassArgumentError) end diff --git a/spec/lib/net/dns/rr/types_spec.rb b/spec/lib/net/dns/rr/types_spec.rb index b05753c72c..d15357cc81 100644 --- a/spec/lib/net/dns/rr/types_spec.rb +++ b/spec/lib/net/dns/rr/types_spec.rb @@ -31,13 +31,13 @@ RSpec.describe Net::DNS::RR::Types do expect(rr_type.to_s).to eql('CNAME') end - it 'initializes with a valid RR type Fixnum argument' do + it 'initializes with a valid RR type Integer argument' do rr_type.send(:initialize, 2) expect(rr_type.to_i).to eql(2) expect(rr_type.to_s).to eql('NS') end - it 'raises when the supplied RR type Fixnum is invalid' do + it 'raises when the supplied RR type Integer is invalid' do expect { rr_type.send(:initialize, 123456) }.to raise_error(TypeArgumentError) expect { rr_type.send(:initialize, -1) }.to raise_error(TypeArgumentError) end diff --git a/test/hooks/string_idx.rb b/test/hooks/string_idx.rb index 2b4794c946..099ea9c057 100644 --- a/test/hooks/string_idx.rb +++ b/test/hooks/string_idx.rb @@ -1,8 +1,8 @@ class String @@idx_reported = {} def [](*args) - - if(args.length == 1 and args[0].class == ::Fixnum and not @@idx_reported[caller[0].to_s]) + + if args.length == 1 && args[0].class == ::Integer && !@@idx_reported[caller[0].to_s] $stderr.puts "HOOK: String[idx] #{caller.join("\t")}\n\n" @@idx_reported[caller[0].to_s] = true end diff --git a/tools/exploit/egghunter.rb b/tools/exploit/egghunter.rb index 12a42716ba..93a0cc3e2b 100755 --- a/tools/exploit/egghunter.rb +++ b/tools/exploit/egghunter.rb @@ -56,7 +56,7 @@ module Egghunter options[:depdest] = v end - opt.on('--depsize ', "(Optional) The DEP size") do |v| + opt.on('--depsize ', "(Optional) The DEP size") do |v| # Do not change this key. This should matching the one in Rex::Exploitation::Egghunter options[:depsize] = v end @@ -96,7 +96,7 @@ module Egghunter elsif options[:format] && !::Msf::Simple::Buffer.transform_formats.include?(options[:format]) raise OptionParser::InvalidOption, "#{options[:format]} is not a valid format" elsif options[:depsize] && options[:depsize] !~ /^\d+$/ - raise OptionParser::InvalidOption, "--depsize must be a Fixnum" + raise OptionParser::InvalidOption, "--depsize must be a Integer" end options[:badchars] = '' unless options[:badchars] diff --git a/tools/exploit/java_deserializer.rb b/tools/exploit/java_deserializer.rb index 5cdc07be82..bfc3c941c1 100755 --- a/tools/exploit/java_deserializer.rb +++ b/tools/exploit/java_deserializer.rb @@ -84,7 +84,7 @@ class JavaDeserializer end # @param [Rex::Java::Serialization::Model::NewObject] obj the object to print - # @param [Fixnum] level the indentation level when printing super classes + # @param [Integer] level the indentation level when printing super classes def print_object(obj, level = 0) prefix = " " * level if obj.class_desc.description.class == Rex::Java::Serialization::Model::NewClassDesc @@ -97,7 +97,7 @@ class JavaDeserializer end # @param [Rex::Java::Serialization::Model::NewClassDesc] c the class to print - # @param [Fixnum] level the indentation level when printing super classes + # @param [Integer] level the indentation level when printing super classes def print_class(c, level = 0) prefix = " " * level puts "#{prefix}Class Name: #{c.class_name}" @@ -118,7 +118,7 @@ class JavaDeserializer end # @param [Rex::Java::Serialization::Model::NewArray] arr the array to print - # @param [Fixnum] level the indentation level when printing super classes + # @param [Integer] level the indentation level when printing super classes def print_array(arr, level = 0) prefix = " " * level if arr.array_description.description.class == Rex::Java::Serialization::Model::NewClassDesc diff --git a/tools/exploit/jsobfu.rb b/tools/exploit/jsobfu.rb index 732a9c9d52..833e310198 100755 --- a/tools/exploit/jsobfu.rb +++ b/tools/exploit/jsobfu.rb @@ -20,7 +20,7 @@ module Jsobfu opt.separator '' opt.separator 'Specific options:' - opt.on('-t', '--iteration ', "Number of times to obfuscate the JavaScript") do |v| + opt.on('-t', '--iteration ', "Number of times to obfuscate the JavaScript") do |v| options[:iteration] = v end diff --git a/tools/exploit/virustotal.rb b/tools/exploit/virustotal.rb index da7a9b067a..36ba7446b6 100755 --- a/tools/exploit/virustotal.rb +++ b/tools/exploit/virustotal.rb @@ -424,7 +424,7 @@ class Driver print_status "content. To read the complete Terms of Service for VirusTotal, please go to the" print_status "following link:" print_status "https://www.virustotal.com/en/about/terms-of-service/" - print_status + print_status print_status "If you prefer your own API key, you may obtain one at VirusTotal." while true @@ -440,7 +440,7 @@ class Driver # Retrieves a report from VirusTotal # @param vt [VirusTotal] VirusTotal object # @param res [Hash] Last submission response - # @param delay [Fixnum] Delay + # @param delay [Integer] Delay # @return [Hash] VirusTotal response that contains the report # def wait_report(vt, res, delay) diff --git a/tools/password/md5_lookup.rb b/tools/password/md5_lookup.rb index 77d1e4a857..d22f8dc5ac 100755 --- a/tools/password/md5_lookup.rb +++ b/tools/password/md5_lookup.rb @@ -148,7 +148,7 @@ module Md5LookupUtility attr_accessor :rhost # @!attribute rport - # @return [Fixnum] The port number to md5cracker.org + # @return [Integer] The port number to md5cracker.org attr_accessor :rport # @!attribute target_uri