Module: PWN::WWW::Pastebin

Defined in:
lib/pwn/www/pastebin.rb

Overview

This plugin supports Pastebin actions.

Class Method Summary collapse

Class Method Details

.authorsObject

Author(s)

0day Inc. <[email protected]>



54
55
56
57
58
# File 'lib/pwn/www/pastebin.rb', line 54

public_class_method def self.authors
  "AUTHOR(S):
    0day Inc. <[email protected]>
  "
end

.close(opts = {}) ⇒ Object

Supported Method Parameters

browser_obj = PWN::WWW::Pastebin.close(

browser_obj: 'required - browser_obj returned from #open method'

)



43
44
45
46
47
48
49
50
# File 'lib/pwn/www/pastebin.rb', line 43

public_class_method def self.close(opts = {})
  browser_obj = opts[:browser_obj]
  PWN::Plugins::TransparentBrowser.close(
    browser_obj: browser_obj
  )
rescue StandardError => e
  raise e
end

.helpObject

Display Usage for this Module



62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/pwn/www/pastebin.rb', line 62

public_class_method def self.help
  puts "USAGE:
    browser_obj = #{self}.open(
      browser_type: 'optional :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
      proxy: 'optional - scheme://proxy_host:port',
      with_tor: 'optional - boolean (defaults to false)'
    )
    puts browser_obj.public_methods

    browser_obj = #{self}.onion(
      browser_obj: 'required - browser_obj returned from #open method'
    )

    browser_obj = #{self}.close(
      browser_obj: 'required - browser_obj returned from #open method'
    )

    #{self}.authors
  "
end

.onion(opts = {}) ⇒ Object

Supported Method Parameters

browser_obj = PWN::WWW::Pastebin.onion(

browser_obj: 'required - browser_obj returned from #open method'

)



29
30
31
32
33
34
35
36
# File 'lib/pwn/www/pastebin.rb', line 29

public_class_method def self.onion(opts = {})
  browser_obj = opts[:browser_obj]
  browser_obj.goto('http://lw4ipk5choakk5ze.onion')

  browser_obj
rescue StandardError => e
  raise e
end

.open(opts = {}) ⇒ Object

Supported Method Parameters

browser_obj = PWN::WWW::Pastebin.open(

browser_type: 'optional - :firefox|:chrome|:ie|:headless (Defaults to :firefox)',
proxy: 'optional - scheme://proxy_host:port',
with_tor: 'optional - boolean (defaults to false)'

)



14
15
16
17
18
19
20
21
22
# File 'lib/pwn/www/pastebin.rb', line 14

public_class_method def self.open(opts = {})
  browser_obj = PWN::Plugins::TransparentBrowser.open(opts)

  browser_obj.goto('https://pastebin.com')

  browser_obj
rescue StandardError => e
  raise e
end