pwn 0.5.137 → 0.5.139
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/pwn/plugins/irc.rb +80 -11
- data/lib/pwn/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4215e8bfe381fadb6c4004d041abc3029fe4aff8f5f21a7c84145daee9e1f3e
|
4
|
+
data.tar.gz: b96f7ec52607fdd1306a56cf1041a87d0da1f40ebb64fccc8601548b9620cb1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44b412933d9fde8038eb0270249daf50eaa23a00817656b06cb43cf60d47214c7104492281baea5f20e559450be619281cd0ccf750c4bbd7ad2877950f5cabf5
|
7
|
+
data.tar.gz: 42b706e7b59825e5ec7a2338b313196d6ec18bfee85c051e10f415f1edcd2fc1c5e4731b153c40e883a0af76e5a9c5235e0437c487b3ec17229ff6e746277924
|
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.
|
40
|
+
pwn[v0.5.139]: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.
|
55
|
+
pwn[v0.5.139]: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.
|
65
|
+
pwn[v0.5.139]: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:
|
data/lib/pwn/plugins/irc.rb
CHANGED
@@ -14,7 +14,6 @@ module PWN
|
|
14
14
|
# port: 'required - host port (defaults to 6667)',
|
15
15
|
# nick: 'required - nickname',
|
16
16
|
# real: 'optional - real name (defaults to value of nick)',
|
17
|
-
# chan: 'required - channel',
|
18
17
|
# tls: 'optional - boolean connect to host socket using TLS (defaults to false)'
|
19
18
|
# )
|
20
19
|
|
@@ -23,7 +22,6 @@ module PWN
|
|
23
22
|
port = opts[:port] ||= 6667
|
24
23
|
nick = opts[:nick].to_s.scrub
|
25
24
|
real = opts[:real] ||= nick
|
26
|
-
chan = opts[:chan].to_s.scrub
|
27
25
|
tls = opts[:tls] || false
|
28
26
|
|
29
27
|
irc_obj = PWN::Plugins::Sock.connect(
|
@@ -40,14 +38,74 @@ module PWN
|
|
40
38
|
irc_obj.gets
|
41
39
|
irc_obj.flush
|
42
40
|
|
43
|
-
join(irc_obj: irc_obj, chan: chan)
|
44
|
-
|
45
41
|
irc_obj
|
46
42
|
rescue StandardError => e
|
47
43
|
irc_obj = disconnect(irc_obj: irc_obj) unless irc_obj.nil?
|
48
44
|
raise e
|
49
45
|
end
|
50
46
|
|
47
|
+
# Supported Method Parameters::
|
48
|
+
# PWN::Plugins::IRC.ping(
|
49
|
+
# irc_obj: 'required - irc_obj returned from #connect method',
|
50
|
+
# message: 'required - message to send'
|
51
|
+
# )
|
52
|
+
public_class_method def self.ping(opts = {})
|
53
|
+
irc_obj = opts[:irc_obj]
|
54
|
+
message = opts[:message].to_s.scrub
|
55
|
+
|
56
|
+
send(irc_obj: irc_obj, message: "PING :#{message}")
|
57
|
+
irc_obj.gets
|
58
|
+
irc_obj.flush
|
59
|
+
rescue StandardError => e
|
60
|
+
raise e
|
61
|
+
end
|
62
|
+
|
63
|
+
# Supported Method Parameters::
|
64
|
+
# PWN::Plugins::IRC.pong(
|
65
|
+
# irc_obj: 'required - irc_obj returned from #connect method',
|
66
|
+
# message: 'required - message to send'
|
67
|
+
# )
|
68
|
+
public_class_method def self.pong(opts = {})
|
69
|
+
irc_obj = opts[:irc_obj]
|
70
|
+
message = opts[:message].to_s.scrub
|
71
|
+
|
72
|
+
send(irc_obj: irc_obj, message: "PONG :#{message}")
|
73
|
+
irc_obj.gets
|
74
|
+
irc_obj.flush
|
75
|
+
rescue StandardError => e
|
76
|
+
raise e
|
77
|
+
end
|
78
|
+
|
79
|
+
# Supported Method Parameters::
|
80
|
+
# PWN::Plugins::IRC.privmsg(
|
81
|
+
# irc_obj: 'required - irc_obj returned from #connect method',
|
82
|
+
# chan: 'required - channel to send message',
|
83
|
+
# message: 'required - message to send',
|
84
|
+
# )
|
85
|
+
public_class_method def self.privmsg(opts = {})
|
86
|
+
irc_obj = opts[:irc_obj]
|
87
|
+
chan = opts[:chan].to_s.scrub
|
88
|
+
message = opts[:message].to_s.scrub
|
89
|
+
nick = opts[:nick].to_s.scrub
|
90
|
+
|
91
|
+
message_newline_tot = message.split("\n").length
|
92
|
+
if message_newline_tot.positive?
|
93
|
+
message.split("\n") do |message_chunk|
|
94
|
+
this_message = "PRIVMSG #{chan} :#{message_chunk}"
|
95
|
+
if message_chunk.length.positive?
|
96
|
+
PWN::Plugins::IRC.send(
|
97
|
+
irc_obj: irc_obj,
|
98
|
+
message: this_message
|
99
|
+
)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
else
|
103
|
+
send(irc_obj: irc_obj, message: "PRIVMSG #{chan} :#{message}")
|
104
|
+
end
|
105
|
+
rescue StandardError => e
|
106
|
+
raise e
|
107
|
+
end
|
108
|
+
|
51
109
|
# Supported Method Parameters::
|
52
110
|
# PWN::Plugins::IRC.join(
|
53
111
|
# irc_obj: 'required - irc_obj returned from #connect method',
|
@@ -63,7 +121,7 @@ module PWN
|
|
63
121
|
irc_obj.gets
|
64
122
|
irc_obj.flush
|
65
123
|
|
66
|
-
|
124
|
+
privmsg(irc_obj: irc_obj, message: "#{nick} joined.")
|
67
125
|
irc_obj.gets
|
68
126
|
irc_obj.flush
|
69
127
|
rescue StandardError => e
|
@@ -135,7 +193,7 @@ module PWN
|
|
135
193
|
# irc_obj: 'required - irc_obj returned from #connect method',
|
136
194
|
# message: 'required - message to send',
|
137
195
|
# )
|
138
|
-
|
196
|
+
private_class_method def self.send(opts = {})
|
139
197
|
irc_obj = opts[:irc_obj]
|
140
198
|
message = opts[:message].to_s.scrub
|
141
199
|
|
@@ -183,6 +241,22 @@ module PWN
|
|
183
241
|
chan: 'required - channel to join'
|
184
242
|
)
|
185
243
|
|
244
|
+
#{self}.ping(
|
245
|
+
irc_obj: 'required - irc_obj returned from #connect method',
|
246
|
+
message: 'required - message to send'
|
247
|
+
)
|
248
|
+
|
249
|
+
#{self}.pong(
|
250
|
+
irc_obj: 'required - irc_obj returned from #connect method',
|
251
|
+
message: 'required - message to send'
|
252
|
+
)
|
253
|
+
|
254
|
+
#{self}.privmsg(
|
255
|
+
irc_obj: 'required - irc_obj returned from #connect method',
|
256
|
+
chan: 'required - channel to send message',
|
257
|
+
message: 'required - message to send'
|
258
|
+
)
|
259
|
+
|
186
260
|
#{self}.part(
|
187
261
|
irc_obj: 'required - irc_obj returned from #connect method',
|
188
262
|
chan: 'required - channel to part',
|
@@ -199,11 +273,6 @@ module PWN
|
|
199
273
|
verbose: 'optional - boolean to enable verbose output (defaults to false)'
|
200
274
|
)
|
201
275
|
|
202
|
-
#{self}.send(
|
203
|
-
irc_obj: 'required - irc_obj returned from #connect method',
|
204
|
-
message: 'required - message to send',
|
205
|
-
)
|
206
|
-
|
207
276
|
irc_obj = #{self}.disconnect(
|
208
277
|
irc_obj: 'required - irc_obj returned from #connect method'
|
209
278
|
)
|
data/lib/pwn/version.rb
CHANGED