pwn 0.4.857 → 0.4.859

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fcfa3ae96c3d540922b6b6f18b9dc7440d02121266561241e753c161ccc10ceb
4
- data.tar.gz: b5a820ca67652d3e95f73981b48f9bff1b03808d02e6a74338529204ef3cbcd1
3
+ metadata.gz: 96d587dca69b7afdac55e623aed2e23b7aeb007b0b88d0ff7338698db285cee7
4
+ data.tar.gz: d4c21ceee1fda9783751aaf1a2ab7f7772637d9127d15ef00155bf49a985e4e3
5
5
  SHA512:
6
- metadata.gz: 73f5c6ffc52046512a783c08b7787e834be2bb8968abb833acb2e616935a65189a18730881d38f0124b5d2ce30a308ddaa2273f23c681d5104820139bf783620
7
- data.tar.gz: a77686ec13fba65cb0f60d42886182f1b6b65b1922bf692aa1e0d2190a52bce2e9063c81bf30a9bde28b5117ba7425927f68c74093027970e9755e8a6e2329e5
6
+ metadata.gz: 2a370efa33d8258a5d39afb23a636126f2e7b21702776445e6d671e05edddf9ec34ab5b3257363a2437bf7de7bdb0a5221ff0927835c58eb69689b732af36964
7
+ data.tar.gz: 33b4a892599b5506e9ef8024a0b17a0b3f0016bc7bec49942a66d1a97d4ef767951a1b4d0f443313c3b73a25c01bd470ca37b1c604d419bbe2470926d2c9b8b8
data/Gemfile CHANGED
@@ -11,7 +11,7 @@ gemspec
11
11
  # In some circumstances custom flags are passed to gems in order
12
12
  # to build appropriately. Defer to ./reinstall_pwn_gemset.sh
13
13
  # to review these custom flags (e.g. pg, serialport, etc).
14
- gem 'activesupport', '7.0.7.1'
14
+ gem 'activesupport', '7.0.7.2'
15
15
  gem 'anemone', '0.7.2'
16
16
  gem 'authy', '3.0.1'
17
17
  gem 'aws-sdk', '3.1.0'
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.2.2@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.857]:001 >>> PWN.help
40
+ pwn[v0.4.859]:001 >>> PWN.help
41
41
  ```
42
42
 
43
43
  [![Installing the pwn Security Automation Framework](https://raw.githubusercontent.com/0dayInc/pwn/master/documentation/pwn_install.png)](https://youtu.be/G7iLUY4FzsI)
@@ -52,7 +52,7 @@ $ rvm use ruby-3.2.2@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.857]:001 >>> PWN.help
55
+ pwn[v0.4.859]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
data/lib/pwn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PWN
4
- VERSION = '0.4.857'
4
+ VERSION = '0.4.859'
5
5
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'faker'
4
3
  require 'json'
5
4
  require 'uri'
6
5
  require 'yaml'
@@ -81,7 +80,7 @@ module PWN
81
80
  # programs_arr: 'required - array of hashes returned from #get_bounty_programs method',
82
81
  # browser_opts: 'optional - opts supported by PWN::Plugins::TransparentBrowser.open method',
83
82
  # name: 'optional - name of burp target config file (defaults to ALL)',
84
- # path: 'optional - path to save burp target config files (defaults to "./burp_target_config_file-NAME.json"))'
83
+ # root_dir: 'optional - directory to save burp target config files (defaults to "./"))'
85
84
  # )
86
85
 
87
86
  public_class_method def self.save_burp_target_config_file(opts = {})
@@ -96,20 +95,22 @@ module PWN
96
95
  browser_opts[:browser_type] = :rest
97
96
 
98
97
  name = opts[:name]
99
- path = opts[:path]
98
+ root_dir = opts[:root_dir]
100
99
 
101
100
  rest_obj = PWN::Plugins::TransparentBrowser.open(browser_opts)
102
101
  rest_client = rest_obj[:browser]::Request
102
+ user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 13_5_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36'
103
103
 
104
104
  if name
105
- path = "./burp_target_config_file-#{name}.json" if opts[:path].nil?
105
+ path = "./burp_target_config_file-#{name}.json" if opts[:root_dir].nil?
106
+ path = "#{root_dir}/burp_target_config_file-#{name}.json" unless opts[:root_dir].nil?
106
107
  burp_download_link = programs_arr.select do |program|
107
108
  program[:name] == name
108
109
  end.first[:burp_target_config]
109
110
 
110
111
  resp = rest_client.execute(
111
112
  method: :get,
112
- headers: { user_agent: Faker::Internet.user_agent },
113
+ headers: { user_agent: user_agent },
113
114
  url: burp_download_link
114
115
  )
115
116
  json_resp = JSON.parse(resp.body)
@@ -121,11 +122,12 @@ module PWN
121
122
  begin
122
123
  name = program[:name]
123
124
  burp_download_link = program[:burp_target_config]
124
- path = "./burp_target_config_file-#{name}.json" if opts[:path].nil?
125
+ path = "./burp_target_config_file-#{name}.json" if opts[:root_dir].nil?
126
+ path = "#{root_dir}/burp_target_config_file-#{name}.json" unless opts[:root_dir].nil?
125
127
 
126
128
  resp = rest_client.execute(
127
129
  method: :get,
128
- headers: { user_agent: Faker::Internet.user_agent },
130
+ headers: { user_agent: user_agent },
129
131
  url: burp_download_link
130
132
  )
131
133
  json_resp = JSON.parse(resp.body)
@@ -133,7 +135,8 @@ module PWN
133
135
  puts "Saving to: #{path}"
134
136
  File.write(path, JSON.pretty_generate(json_resp))
135
137
  print '.'
136
- rescue RestClient::NotFound
138
+ rescue JSON::ParserError,
139
+ RestClient::NotFound
137
140
  print '-'
138
141
  next
139
142
  end
@@ -235,7 +238,7 @@ module PWN
235
238
  programs_arr: 'required - array of hashes returned from #get_bounty_programs method',
236
239
  browser_opts: 'optional - opts supported by PWN::Plugins::TransparentBrowser.open method',
237
240
  name: 'optional - name of burp target config file (defaults to ALL)',
238
- path: 'optional - path to save burp target config files (defaults to \"./burp_target_config_file-NAME.json\"))'
241
+ root_dir: 'optional - directory to save burp target config files (defaults to \"./\"))'
239
242
  )
240
243
 
241
244
  browser_obj = #{self}.login(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.857
4
+ version: 0.4.859
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 7.0.7.1
19
+ version: 7.0.7.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 7.0.7.1
26
+ version: 7.0.7.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: anemone
29
29
  requirement: !ruby/object:Gem::Requirement