module PWN::Plugins::HackerOne
def self.authors
def self.authors st.pentest@0dayinc.com>
def self.h1_rest_call(opts = {})
def self.h1_rest_call(opts = {}) bj] ts[:http_method].nil? t s[:http_method].to_s.scrub.to_sym est_call].to_s.scrub ttp_body].to_s.scrub [:h1_success].to_s.scrub https://api.hackerone.com/v1/'.to_s.scrub :api_token] Plugins::TransparentBrowser.open(browser_type: :rest)::Request er_obj[:browser]::Request lient.execute( _api_uri}/#{rest_call}", 'application/json; charset=UTF-8', en: api_token } lient.execute( _api_uri}/#{rest_call}", 'application/json; charset=UTF-8' ody ror("Unsupported HTTP Method #{http_method} for #{self} Plugin") => e
def self.help
def self.help .login( uired username', al api token (will prompt if nil)' .logout( red h1_obj returned from #login method'
def self.login(opts = {})
def self.login(opts = {}) sername].to_s.scrub 'https://api.hackerone.com/v1/'.to_s.scrub oken].nil? gins::AuthenticationHelper.mask_password ken].to_s.scrub name] = username n] = token ername}:#{token}" h = Base64.strict_encode64(base64_str).to_s.chomp = "Basic #{base64_encoded_auth}" ging into HackerOne REST API: #{base_h1_api_uri}") :Plugins::TransparentBrowser.open(browser_type: :rest) ser_obj[:browser]::Request ient.execute( _uri, basic_auth_header, 'application/json; charset=UTF-8' taining the post-authenticated HackerOne REST API token ON.parse(response, symbolize_names: true) response['success'] esponse['token'] ] = h1_success = api_token se] = response => e
def self.logout(opts = {})
def self.logout(opts = {}) obj] ging out...') => e