pwn 0.4.680 → 0.4.681

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: 6e73bd67263ace8f9f5aa216fe0c0196bbfa25be71769a6ca481e05019c5c0ff
4
- data.tar.gz: 3f613847407a0f17ea04cc9ef1e96160cc43377bf31e08345f36a92681615cc6
3
+ metadata.gz: 717524d6d611b962be2b71ffb95c427abd3c173347b651904b2a1b1294fd807b
4
+ data.tar.gz: 894b9128466217e15befedcc67296d47de56e61640eb88c119512994a9db98f1
5
5
  SHA512:
6
- metadata.gz: e3605d4a97ba12d392a9a6b359bbcffd598d83d193ae4f66788b59915017b057c2bbf119ae526318e189cda9a51599e8962e9ee64e15dc0aef429df038896ee4
7
- data.tar.gz: c3666977f6a9286b156e0360012c7674e2c1fb68eb988b26305c34d9ba0cef25d2545986f01627da368585028fa4610f3a597a3b9d7511a346227319e1895d0b
6
+ metadata.gz: e129b34830468a21f9fa339af587f3c8428cd0328dfa27c8dc5b1e78dc76264dba7398a2341c47f558f072cc36a6024c93ada70564b97fe8b9cbfbd440aa34bc
7
+ data.tar.gz: 6e9383ba997f1146c6196720e4d2ff0c33b8b982814d37d373eb7888b1a4a21d721e0d35aeb629da10e4c93c497ce7716120220769e131f41eb13415125dc720
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.680]:001 >>> PWN.help
40
+ pwn[v0.4.681]: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.680]:001 >>> PWN.help
55
+ pwn[v0.4.681]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
@@ -15,7 +15,7 @@ OptionParser.new do |options|
15
15
  opts[:target_range] = t
16
16
  end
17
17
 
18
- options.on('-eFILE', '--target-exclude-file=FILE', '<Optional - nmap excludes file>') do |e|
18
+ options.on('-eFILE', '--target-exclude-file=FILE', '<Optional - IP excludes file>') do |e|
19
19
  opts[:exclude_file] = e
20
20
  end
21
21
 
@@ -23,6 +23,10 @@ OptionParser.new do |options|
23
23
  opts[:interface] = i
24
24
  end
25
25
 
26
+ options.on('-rDIR', '--results-root=DIR', '<Optional - nmap results root (Default: /tmp)>') do |r|
27
+ opts[:results_root] = r
28
+ end
29
+
26
30
  options.on('-T', '--tor', '<Optional - Source Scans from Tor Nodes>') do |t|
27
31
  opts[:with_tor] = t
28
32
  end
@@ -41,22 +45,28 @@ puts "\n\n\n#{banner}"
41
45
  puts "- STARTED: #{started_at} "
42
46
 
43
47
  target_range = opts[:target_range]
48
+
49
+ results_root = opts[:results_root]
50
+ results_root ||= '/tmp'
51
+ FileUtils.mkdir_p results_root
52
+ puts "Results Saved in: #{results_root}"
53
+
44
54
  exclude_file = opts[:exclude_file]
45
- exclude_file ||= '/tmp/nmap_targets_exclude.txt'
55
+ exclude_file ||= "#{results_root}/nmap_targets_exclude.txt"
56
+ # We create an exclude file (even if its empty)
57
+ File.new(exclude_file, 'w') unless File.exist?(exclude_file)
58
+
46
59
  interface = opts[:interface]
47
60
  interface ||= 'eth0'
61
+
48
62
  with_tor = true if opts[:with_tor]
49
63
  with_tor ||= false
64
+
50
65
  if with_tor
51
66
  tor_obj = PWN::Plugins::Tor.start
52
67
  proxy = ["socks4://#{tor_obj[:ip]}:#{tor_obj[:port]}"]
53
68
  end
54
69
 
55
- File.new(exclude_file, 'w') unless File.exist?(exclude_file)
56
- nmap_results_root = File.dirname(exclude_file)
57
- FileUtils.mkdir_p nmap_results_root
58
- puts "nmap Results Saved in: #{nmap_results_root}"
59
-
60
70
  discovery_tcp_ports = {
61
71
  ftp: 21,
62
72
  ssh: 22,
@@ -126,10 +136,10 @@ discovery_sctp_ports = {
126
136
  sicc: 38_412
127
137
  }
128
138
 
129
- target_file = "#{nmap_results_root}/nmap_targets.txt"
130
- latest_discovery_results = "#{nmap_results_root}/nmap_discovery_results.xml"
131
- latest_tcp_results = "#{nmap_results_root}/nmap_tcp_results"
132
- latest_udp_results = "#{nmap_results_root}/nmap_udp_results"
139
+ target_file = "#{results_root}/nmap_targets.txt"
140
+ latest_discovery_results = "#{results_root}/nmap_discovery_results.xml"
141
+ latest_tcp_results = "#{results_root}/nmap_tcp_results"
142
+ latest_udp_results = "#{results_root}/nmap_udp_results"
133
143
 
134
144
  begin
135
145
  # Per man nmap:
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.680'
4
+ VERSION = '0.4.681'
5
5
  end
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.680
4
+ version: 0.4.681
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.