pwn 0.5.126 → 0.5.128

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: bb25af06b1f138ea922302864fc36a70f0568d175b8d940063f34b064b31221c
4
- data.tar.gz: ed47b1b293f30a3829b7d756c3df0ddbddd7c724c62efa92bc9688ff3a2a26b8
3
+ metadata.gz: aeee907bfc7c248eeec181361a541d57ba6981e4a783352a7bb229dfa01fda21
4
+ data.tar.gz: 5452506b02ee9ab69f48f55963b3a37ad7196c4642bfc3e7f94bda8beb9ab891
5
5
  SHA512:
6
- metadata.gz: df0bd769af8907e3dad9c1e449350601b1808e8ad6c77c56a1bfa7411752e423d08b88651f79be905997bbe027ef6bf3bc1e4ba31e6a9e0c085693fe684168c9
7
- data.tar.gz: 2924e1bdba72006616fbf36b55a2350b2a96a6847a20470c53e9aab6c64000a1a091159956a024bf60910bb464c708b8f32999a7a4303773bce48e43a7b65d7c
6
+ metadata.gz: 7289cb78e75f72448dc40f1ca9834e22965789b4f76ec336cdc522fff37538a01469084f017cbf28ffcc0397bfb2d9528217d7ebe21e01df293c23f55e16ecda
7
+ data.tar.gz: 858af3ebc0e7f97f4213675adfa6ca17d2a23f92b47a6ea7ed3b8b08dee0ed8f0bd438d8db0667e82c7e1958f22daf5405334c5028b23badb657b89b0ecb86ee
data/Gemfile CHANGED
@@ -23,7 +23,7 @@ gem 'bundler', '>=2.5.10'
23
23
  gem 'bundler-audit', '0.9.1'
24
24
  gem 'bunny', '2.22.0'
25
25
  gem 'colorize', '1.1.0'
26
- gem 'credit_card_validations', '6.1.0'
26
+ gem 'credit_card_validations', '6.2.0'
27
27
  gem 'eventmachine', '1.2.7'
28
28
  gem 'executable-hooks', '1.7.1'
29
29
  gem 'faker', '3.3.1'
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ cd /opt/pwn
37
37
  $ ./install.sh
38
38
  $ ./install.sh ruby-gem
39
39
  $ pwn
40
- pwn[v0.5.126]:001 >>> PWN.help
40
+ pwn[v0.5.128]: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.3.1@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.126]:001 >>> PWN.help
55
+ pwn[v0.5.128]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
  If you're using a multi-user install of RVM do:
@@ -62,7 +62,7 @@ $ rvm use ruby-3.3.1@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.126]:001 >>> PWN.help
65
+ pwn[v0.5.128]:001 >>> PWN.help
66
66
  ```
67
67
 
68
68
  PWN periodically upgrades to the latest version of Ruby which is reflected in `/opt/pwn/.ruby-version`. The easiest way to upgrade to the latest version of Ruby from a previous PWN installation is to run the following script:
@@ -32,6 +32,7 @@ module PWN
32
32
  ⣿⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠁⠀⠀⠀⠀⣿
33
33
  ⣿⠀⠀⠀⠀⠀⠀⠈⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⣿
34
34
  ⠛⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠛⠛⠛⠉⠉⠛⠛⠛⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠛
35
+ ⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛
35
36
  '.red
36
37
  rescue StandardError => e
37
38
  raise e
@@ -0,0 +1,133 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'openssl'
4
+
5
+ module PWN
6
+ module Plugins
7
+ # This plugin was created to interact with IRC protocols
8
+ module IRC
9
+ @@logger = PWN::Plugins::PWNLogger.create
10
+
11
+ # Supported Method Parameters::
12
+ # irc_obj = PWN::Plugins::IRC.connect(
13
+ # host: 'required - host or ip (defaults to "127.0.0.1")',
14
+ # port: 'required - host port (defaults to 6667)',
15
+ # nick: 'required - nickname',
16
+ # real: 'optional - real name (defaults to value of nick)',
17
+ # chan: 'required - channel',
18
+ # tls: 'optional - boolean connect to host socket using TLS (defaults to false)'
19
+ # )
20
+
21
+ public_class_method def self.connect(opts = {})
22
+ host = opts[:host] ||= '127.0.0.1'
23
+ port = opts[:port] ||= 6667
24
+ nick = opts[:nick].to_s.scrub
25
+ real = opts[:real] ||= nick
26
+ chan = opts[:chan].to_s.scrub
27
+ tls = opts[:tls] || false
28
+
29
+ irc_obj = PWN::Plugins::Sock.connect(
30
+ target: host,
31
+ port: port,
32
+ tls: tls
33
+ )
34
+
35
+ send(irc_obj: irc_obj, message: "NICK #{nick}")
36
+ send(irc_obj: irc_obj, message: "USER #{nick} #{host} #{host} :#{real}")
37
+ send(irc_obj: irc_obj, message: "JOIN #{chan}")
38
+ send(irc_obj: irc_obj, message: "PRIVMSG #{chan} :#{nick} joined.")
39
+
40
+ irc_obj
41
+ rescue StandardError => e
42
+ irc_obj = disconnect(irc_obj: irc_obj) unless irc_obj.nil?
43
+ raise e
44
+ end
45
+
46
+ # Supported Method Parameters::
47
+ # PWN::Plugins::IRC.listen(
48
+ # irc_obj: 'required - irc_obj returned from #connect method'
49
+ # )
50
+
51
+ public_class_method def self.listen(opts = {})
52
+ irc_obj = opts[:irc_obj]
53
+
54
+ loop do
55
+ message = irc_obj.gets
56
+ @@logger.info(message)
57
+ if block_given?
58
+ # Extract the message text from the message
59
+ message_text = message.split[3..-1].join(' ')[1..-1]
60
+ yield message_text
61
+ end
62
+ end
63
+ rescue StandardError => e
64
+ raise e
65
+ ensure
66
+ disconnect(irc_obj: irc_obj)
67
+ end
68
+
69
+ public_class_method def self.send(opts = {})
70
+ irc_obj = opts[:irc_obj]
71
+ message = opts[:message].to_s.scrub
72
+
73
+ irc_obj.puts message
74
+ # Wait for a response from the server
75
+ # This is a hack to ensure the message is processed by the server
76
+ # before sending another message
77
+ irc_obj.gets
78
+ irc_obj.flush
79
+ rescue StandardError => e
80
+ raise e
81
+ end
82
+
83
+ # Supported Method Parameters::
84
+ # PWN::Plugins::IRC.disconnect(
85
+ # irc_obj: 'required - irc_obj returned from #connect method'
86
+ # )
87
+
88
+ public_class_method def self.disconnect(opts = {})
89
+ irc_obj = opts[:irc_obj]
90
+ PWN::Plugins::Sock.disconnect(sock_obj: irc_obj) unless irc_obj.nil?
91
+ rescue StandardError => e
92
+ raise e
93
+ end
94
+
95
+ # Author(s):: 0day Inc. <support@0dayinc.com>
96
+
97
+ public_class_method def self.authors
98
+ "AUTHOR(S):
99
+ 0day Inc. <support@0dayinc.com>
100
+ "
101
+ end
102
+
103
+ # Display Usage for this Module
104
+
105
+ public_class_method def self.help
106
+ puts "USAGE:
107
+ irc_obj = #{self}.connect(
108
+ host: 'required - host or ip',
109
+ port: 'required - host port',
110
+ nick: 'required - nickname',
111
+ chan: 'required - channel',
112
+ tls: 'optional - boolean connect to host socket using TLS (defaults to false)'
113
+ )
114
+
115
+ #{self}.listen(
116
+ irc_obj: 'required - irc_obj returned from #connect method'
117
+ )
118
+
119
+ #{self}.send(
120
+ irc_obj: 'required - irc_obj returned from #connect method',
121
+ message: 'required - message to send'
122
+ )
123
+
124
+ irc_obj = #{self}.disconnect(
125
+ irc_obj: 'required - irc_obj returned from #connect method'
126
+ )
127
+
128
+ #{self}.authors
129
+ "
130
+ end
131
+ end
132
+ end
133
+ end
data/lib/pwn/plugins.rb CHANGED
@@ -32,6 +32,7 @@ module PWN
32
32
  autoload :HackerOne, 'pwn/plugins/hacker_one'
33
33
  autoload :IBMAppscan, 'pwn/plugins/ibm_appscan'
34
34
  autoload :IPInfo, 'pwn/plugins/ip_info'
35
+ autoload :IRC, 'pwn/plugins/irc'
35
36
  autoload :Jenkins, 'pwn/plugins/jenkins'
36
37
  autoload :JiraServer, 'pwn/plugins/jira_server'
37
38
  autoload :JSONPathify, 'pwn/plugins/json_pathify'
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.5.126'
4
+ VERSION = '0.5.128'
5
5
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe PWN::Plugins::IRC do
6
+ it 'should display information for authors' do
7
+ authors_response = PWN::Plugins::IRC
8
+ expect(authors_response).to respond_to :authors
9
+ end
10
+
11
+ it 'should display information for existing help method' do
12
+ help_response = PWN::Plugins::IRC
13
+ expect(help_response).to respond_to :help
14
+ end
15
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.126
4
+ version: 0.5.128
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-17 00:00:00.000000000 Z
11
+ date: 2024-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - '='
172
172
  - !ruby/object:Gem::Version
173
- version: 6.1.0
173
+ version: 6.2.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - '='
179
179
  - !ruby/object:Gem::Version
180
- version: 6.1.0
180
+ version: 6.2.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: eventmachine
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -1805,6 +1805,7 @@ files:
1805
1805
  - lib/pwn/plugins/hacker_one.rb
1806
1806
  - lib/pwn/plugins/ibm_appscan.rb
1807
1807
  - lib/pwn/plugins/ip_info.rb
1808
+ - lib/pwn/plugins/irc.rb
1808
1809
  - lib/pwn/plugins/jenkins.rb
1809
1810
  - lib/pwn/plugins/jira_server.rb
1810
1811
  - lib/pwn/plugins/json_pathify.rb
@@ -2136,6 +2137,7 @@ files:
2136
2137
  - spec/lib/pwn/plugins/hacker_one_spec.rb
2137
2138
  - spec/lib/pwn/plugins/ibm_appscan_spec.rb
2138
2139
  - spec/lib/pwn/plugins/ip_info_spec.rb
2140
+ - spec/lib/pwn/plugins/irc_spec.rb
2139
2141
  - spec/lib/pwn/plugins/jenkins_spec.rb
2140
2142
  - spec/lib/pwn/plugins/jira_server_spec.rb
2141
2143
  - spec/lib/pwn/plugins/json_pathify_spec.rb