Sha256: d8c6c2c5c824ba528878aa50d18f3878c8f3fa7b1fff2e4196c8b7664bdc83ed

Contents?: true

Size: 1.01 KB

Versions: 4980

Compression:

Stored size: 1.01 KB

Contents

base_url = '<base_target_api_url>'

rest_response = rest_client.execute(
  method: :post,
  url: "#{base_url}/<login_path>",
  verify_ssl: false,
  headers: { content_type: 'application/json' },
  payload: '{ "username":"<target_username>", "password":"<target_password>" }'
) { |response, request, result| response } # Don't raise exceptions and simply return the response

token_hash = JSON.parse(rest_response.body, symbolize_names: true)

rest_response = rest_client.execute(
  method: :get,
  url: "#{base_url}/<misc_api_path>",
  verify_ssl: false,
  headers: {
    content_type: 'application/json',
    authorization: token_hash[:bearer_token],
    params: {
      sort: 'desc',
      max_records: 36
    }
  }
) {|response, request, result| response } # Don't raise exceptions and simply return the response

# If you want to force a Custom HTTP Header to Be Passed to pwn_arachni_rest
# the following example is reserved for such cases:
pwn_arachni_rest_custom_http_header = "Authorization: #{token_hash[:bearer_token]}"

Version data entries

4,980 entries across 830 versions & 1 rubygems

Version Path
pwn-0.5.253 etc/userland/aws/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.253 etc/userland/docker/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.253 etc/userland/ruby-gem/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.253 etc/userland/qemu/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.253 etc/userland/vmware/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.253 etc/userland/virtualbox/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.252 etc/userland/aws/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.252 etc/userland/ruby-gem/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.252 etc/userland/virtualbox/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.252 etc/userland/docker/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.252 etc/userland/qemu/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.252 etc/userland/vmware/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.251 etc/userland/virtualbox/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.251 etc/userland/vmware/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.251 etc/userland/aws/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.251 etc/userland/docker/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.251 etc/userland/qemu/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.251 etc/userland/ruby-gem/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.250 etc/userland/vmware/arachni/navigation-REST.instruct.EXAMPLE
pwn-0.5.250 etc/userland/aws/arachni/navigation-REST.instruct.EXAMPLE