pwn 0.5.215 → 0.5.216

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a897b97fac7adfe633ee6e5086e1ffbd417c7d8782ac0450f1341f772a19e677
4
- data.tar.gz: 53adc1fc56e446f316933231f3ba268b39175f85066109cc098e0854db9b492a
3
+ metadata.gz: 75081ed978a5502ced363b73ec553414e41e5054c466192c6fe3a6c2a273883b
4
+ data.tar.gz: 26bff234ee277dce390cca5effd59f3557a8b98109d42205ffd4abdeb0201ffa
5
5
  SHA512:
6
- metadata.gz: 25ea7696188dc9cef25a4358869ac2cefc3d982db93251f7d11772adc74a3bcbb22630e87ddbec96d12cffc5d04a0e676b608bc8e3c583545734021efe2728b1
7
- data.tar.gz: cea83443e19250012e3efa2376f48d254595fe499b0afa2dda201acf34d27318f9f8843897496a930dd3e27e89707cd61fb381edcce54ec2d73d59b6652f014a
6
+ metadata.gz: acb028aea1f9837b77c04434af85d422d0ddf89409bf2337b00de3fa5565576e6a047ef66a232ce8fa3586dee938237cc0706e4dc3046402436d71cf602e8967
7
+ data.tar.gz: a0e755c4abc02d66bfe3b1d7614a2362c79c74cd7251ed419d1d25b52264ea70326beec5935d1dfab011003df863c6065eb6ca587c93740bd045e12abc6eaff5
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.215]:001 >>> PWN.help
40
+ pwn[v0.5.216]: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.5@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.5.215]:001 >>> PWN.help
55
+ pwn[v0.5.216]: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.5@pwn
62
62
  $ rvmsudo gem uninstall --all --executables pwn
63
63
  $ rvmsudo gem install --verbose pwn
64
64
  $ pwn
65
- pwn[v0.5.215]:001 >>> PWN.help
65
+ pwn[v0.5.216]: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:
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'pwn'
5
+ require 'json'
6
+ require 'nokogiri'
7
+ require 'optparse'
8
+
9
+ # Set the path to your project directory
10
+ opts = {}
11
+ OptionParser.new do |options|
12
+ options.banner = "USAGE:
13
+ #{File.basename($PROGRAM_NAME)} [opts]
14
+ "
15
+
16
+ options.on('-rPATH', '--rdoc-root-dir=PATH', '<Optional - RDoc root directory (Default: "/opt/pwn/rdoc/PWN")>') do |r|
17
+ opts[:rdoc_root] = r
18
+ end
19
+
20
+ options.on('-jPATH', '--jsonl-results=PATH', '<Optional - Path to save JSONL file (Default: "/tmp/RDoc_Parent_Basename-TIMESTAMP.jsonl">') do |j|
21
+ opts[:jsonl_results] = j
22
+ end
23
+ end.parse!
24
+
25
+ begin
26
+ rdoc_root = opts[:rdoc_root] ||= '/opt/pwn/rdoc/PWN'
27
+ raise 'ERROR: RDoc root directory not found.' unless Dir.exist?(rdoc_root)
28
+
29
+ # Set the path to save the JSONL file
30
+ timestamp = Time.now.strftime('%Y-%m-%d-%H.%M.%S')
31
+ rdoc_root_basename = File.basename(rdoc_root)
32
+ jsonl_results = opts[:jsonl_results] ||= "/tmp/#{rdoc_root_basename}-#{timestamp}.jsonl"
33
+
34
+ # List of HTML files generated by rdoc (adjust based on your project's structure)
35
+ # Omit the first element, which is the Object.html file
36
+ rdoc_html_files = Dir.glob("#{rdoc_root}/**/*.html")
37
+ rdoc_html_files.push("#{rdoc_root}.html")
38
+
39
+ html_to_jsonl = []
40
+ rdoc_html_files.sort.each do |rdoc_html_file|
41
+ # Parse the HTML content
42
+ html_markup = Nokogiri::HTML.parse(File.read(rdoc_html_file))
43
+
44
+ # Consume Public Constants, Public Class Methods, Public Instance Methods, and Public Attributes
45
+ # from the html_markup and convert them to JSONL format, pushing into the html_to_jsonl array
46
+ # JSONL format should be the following:
47
+ # { "prompt": "Using Module_Namespace.method", "completion": "Module_Namespace.method.description" }
48
+ # puts "Parsing: #{rdoc_html_file}"
49
+ # gets
50
+
51
+ module_name = html_markup.xpath('//main/h1').text.split[1]
52
+ # puts "Module: #{module_name.inspect}"
53
+ # gets
54
+
55
+ html_markup.xpath('//div[@class="method-detail anchor-link "]').each do |method_detail|
56
+ method_name = method_detail.xpath('.//span[@class="method-name"]').text
57
+ # puts "Method: #{method_name.inspect}"
58
+ # gets
59
+
60
+ method_description = method_detail.xpath('.//dl[@class="rdoc-list note-list"]').text
61
+ # puts "Desc: #{method_description.inspect}"
62
+ # gets
63
+
64
+ prompt = "#{module_name}.#{method_name} Usage"
65
+ completion = "`#{module_name}.#{method_name}`: #{method_description}"
66
+
67
+ jsonl = "{ \"prompt\": \"#{prompt}\", \"completion\": \"#{completion}\" }\n"
68
+ # puts "JSONL: #{jsonl}"
69
+ # gets
70
+
71
+ html_to_jsonl.push(jsonl)
72
+ end
73
+ end
74
+
75
+ # Output JSONL data
76
+ File.write(jsonl_results, html_to_jsonl.join)
77
+ rescue Interrupt
78
+ puts "\n#{File.basename($PROGRAM_NAME)} => Goodbye."
79
+ rescue StandardError => e
80
+ puts 'ERROR: Something Happend'
81
+ raise e
82
+ end
@@ -0,0 +1,298 @@
1
+
2
+ SSUUMMMMAARRYY OOFF LLEESSSS CCOOMMMMAANNDDSS
3
+
4
+ Commands marked with * may be preceded by a number, _N.
5
+ Notes in parentheses indicate the behavior if _N is given.
6
+ A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.
7
+
8
+ h H Display this help.
9
+ q :q Q :Q ZZ Exit.
10
+ ---------------------------------------------------------------------------
11
+
12
+ MMOOVVIINNGG
13
+
14
+ e ^E j ^N CR * Forward one line (or _N lines).
15
+ y ^Y k ^K ^P * Backward one line (or _N lines).
16
+ f ^F ^V SPACE * Forward one window (or _N lines).
17
+ b ^B ESC-v * Backward one window (or _N lines).
18
+ z * Forward one window (and set window to _N).
19
+ w * Backward one window (and set window to _N).
20
+ ESC-SPACE * Forward one window, but don't stop at end-of-file.
21
+ d ^D * Forward one half-window (and set half-window to _N).
22
+ u ^U * Backward one half-window (and set half-window to _N).
23
+ ESC-) RightArrow * Right one half screen width (or _N positions).
24
+ ESC-( LeftArrow * Left one half screen width (or _N positions).
25
+ ESC-} ^RightArrow Right to last column displayed.
26
+ ESC-{ ^LeftArrow Left to first column.
27
+ F Forward forever; like "tail -f".
28
+ ESC-F Like F but stop when search pattern is found.
29
+ r ^R ^L Repaint screen.
30
+ R Repaint screen, discarding buffered input.
31
+ ---------------------------------------------------
32
+ Default "window" is the screen height.
33
+ Default "half-window" is half of the screen height.
34
+ ---------------------------------------------------------------------------
35
+
36
+ SSEEAARRCCHHIINNGG
37
+
38
+ /_p_a_t_t_e_r_n * Search forward for (_N-th) matching line.
39
+ ?_p_a_t_t_e_r_n * Search backward for (_N-th) matching line.
40
+ n * Repeat previous search (for _N-th occurrence).
41
+ N * Repeat previous search in reverse direction.
42
+ ESC-n * Repeat previous search, spanning files.
43
+ ESC-N * Repeat previous search, reverse dir. & spanning files.
44
+ ESC-u Undo (toggle) search highlighting.
45
+ ESC-U Clear search highlighting.
46
+ &_p_a_t_t_e_r_n * Display only matching lines.
47
+ ---------------------------------------------------
48
+ A search pattern may begin with one or more of:
49
+ ^N or ! Search for NON-matching lines.
50
+ ^E or * Search multiple files (pass thru END OF FILE).
51
+ ^F or @ Start search at FIRST file (for /) or last file (for ?).
52
+ ^K Highlight matches, but don't move (KEEP position).
53
+ ^R Don't use REGULAR EXPRESSIONS.
54
+ ^S _n Search for match in _n-th parenthesized subpattern.
55
+ ^W WRAP search if no match found.
56
+ ---------------------------------------------------------------------------
57
+
58
+ JJUUMMPPIINNGG
59
+
60
+ g < ESC-< * Go to first line in file (or line _N).
61
+ G > ESC-> * Go to last line in file (or line _N).
62
+ p % * Go to beginning of file (or _N percent into file).
63
+ t * Go to the (_N-th) next tag.
64
+ T * Go to the (_N-th) previous tag.
65
+ { ( [ * Find close bracket } ) ].
66
+ } ) ] * Find open bracket { ( [.
67
+ ESC-^F _<_c_1_> _<_c_2_> * Find close bracket _<_c_2_>.
68
+ ESC-^B _<_c_1_> _<_c_2_> * Find open bracket _<_c_1_>.
69
+ ---------------------------------------------------
70
+ Each "find close bracket" command goes forward to the close bracket
71
+ matching the (_N-th) open bracket in the top line.
72
+ Each "find open bracket" command goes backward to the open bracket
73
+ matching the (_N-th) close bracket in the bottom line.
74
+
75
+ m_<_l_e_t_t_e_r_> Mark the current top line with <letter>.
76
+ M_<_l_e_t_t_e_r_> Mark the current bottom line with <letter>.
77
+ '_<_l_e_t_t_e_r_> Go to a previously marked position.
78
+ '' Go to the previous position.
79
+ ^X^X Same as '.
80
+ ESC-m_<_l_e_t_t_e_r_> Clear a mark.
81
+ ---------------------------------------------------
82
+ A mark is any upper-case or lower-case letter.
83
+ Certain marks are predefined:
84
+ ^ means beginning of the file
85
+ $ means end of the file
86
+ ---------------------------------------------------------------------------
87
+
88
+ CCHHAANNGGIINNGG FFIILLEESS
89
+
90
+ :e [_f_i_l_e] Examine a new file.
91
+ ^X^V Same as :e.
92
+ :n * Examine the (_N-th) next file from the command line.
93
+ :p * Examine the (_N-th) previous file from the command line.
94
+ :x * Examine the first (or _N-th) file from the command line.
95
+ :d Delete the current file from the command line list.
96
+ = ^G :f Print current file name.
97
+ ---------------------------------------------------------------------------
98
+
99
+ MMIISSCCEELLLLAANNEEOOUUSS CCOOMMMMAANNDDSS
100
+
101
+ -_<_f_l_a_g_> Toggle a command line option [see OPTIONS below].
102
+ --_<_n_a_m_e_> Toggle a command line option, by name.
103
+ __<_f_l_a_g_> Display the setting of a command line option.
104
+ ___<_n_a_m_e_> Display the setting of an option, by name.
105
+ +_c_m_d Execute the less cmd each time a new file is examined.
106
+
107
+ !_c_o_m_m_a_n_d Execute the shell command with $SHELL.
108
+ #_c_o_m_m_a_n_d Execute the shell command, expanded like a prompt.
109
+ |XX_c_o_m_m_a_n_d Pipe file between current pos & mark XX to shell command.
110
+ s _f_i_l_e Save input to a file.
111
+ v Edit the current file with $VISUAL or $EDITOR.
112
+ V Print version number of "less".
113
+ ---------------------------------------------------------------------------
114
+
115
+ OOPPTTIIOONNSS
116
+
117
+ Most options may be changed either on the command line,
118
+ or from within less by using the - or -- command.
119
+ Options may be given in one of two forms: either a single
120
+ character preceded by a -, or a name preceded by --.
121
+
122
+ -? ........ --help
123
+ Display help (from command line).
124
+ -a ........ --search-skip-screen
125
+ Search skips current screen.
126
+ -A ........ --SEARCH-SKIP-SCREEN
127
+ Search starts just after target line.
128
+ -b [_N] .... --buffers=[_N]
129
+ Number of buffers.
130
+ -B ........ --auto-buffers
131
+ Don't automatically allocate buffers for pipes.
132
+ -c ........ --clear-screen
133
+ Repaint by clearing rather than scrolling.
134
+ -d ........ --dumb
135
+ Dumb terminal.
136
+ -D xx_c_o_l_o_r . --color=xx_c_o_l_o_r
137
+ Set screen colors.
138
+ -e -E .... --quit-at-eof --QUIT-AT-EOF
139
+ Quit at end of file.
140
+ -f ........ --force
141
+ Force open non-regular files.
142
+ -F ........ --quit-if-one-screen
143
+ Quit if entire file fits on first screen.
144
+ -g ........ --hilite-search
145
+ Highlight only last match for searches.
146
+ -G ........ --HILITE-SEARCH
147
+ Don't highlight any matches for searches.
148
+ -h [_N] .... --max-back-scroll=[_N]
149
+ Backward scroll limit.
150
+ -i ........ --ignore-case
151
+ Ignore case in searches that do not contain uppercase.
152
+ -I ........ --IGNORE-CASE
153
+ Ignore case in all searches.
154
+ -j [_N] .... --jump-target=[_N]
155
+ Screen position of target lines.
156
+ -J ........ --status-column
157
+ Display a status column at left edge of screen.
158
+ -k [_f_i_l_e] . --lesskey-file=[_f_i_l_e]
159
+ Use a lesskey file.
160
+ -K ........ --quit-on-intr
161
+ Exit less in response to ctrl-C.
162
+ -L ........ --no-lessopen
163
+ Ignore the LESSOPEN environment variable.
164
+ -m -M .... --long-prompt --LONG-PROMPT
165
+ Set prompt style.
166
+ -n ......... --line-numbers
167
+ Suppress line numbers in prompts and messages.
168
+ -N ......... --LINE-NUMBERS
169
+ Display line number at start of each line.
170
+ -o [_f_i_l_e] . --log-file=[_f_i_l_e]
171
+ Copy to log file (standard input only).
172
+ -O [_f_i_l_e] . --LOG-FILE=[_f_i_l_e]
173
+ Copy to log file (unconditionally overwrite).
174
+ -p [_p_a_t_t_e_r_n] --pattern=[_p_a_t_t_e_r_n]
175
+ Start at pattern (from command line).
176
+ -P [_p_r_o_m_p_t] --prompt=[_p_r_o_m_p_t]
177
+ Define new prompt.
178
+ -q -Q .... --quiet --QUIET --silent --SILENT
179
+ Quiet the terminal bell.
180
+ -r -R .... --raw-control-chars --RAW-CONTROL-CHARS
181
+ Output "raw" control characters.
182
+ -s ........ --squeeze-blank-lines
183
+ Squeeze multiple blank lines.
184
+ -S ........ --chop-long-lines
185
+ Chop (truncate) long lines rather than wrapping.
186
+ -t [_t_a_g] .. --tag=[_t_a_g]
187
+ Find a tag.
188
+ -T [_t_a_g_s_f_i_l_e] --tag-file=[_t_a_g_s_f_i_l_e]
189
+ Use an alternate tags file.
190
+ -u -U .... --underline-special --UNDERLINE-SPECIAL
191
+ Change handling of backspaces, tabs and carriage returns.
192
+ -V ........ --version
193
+ Display the version number of "less".
194
+ -w ........ --hilite-unread
195
+ Highlight first new line after forward-screen.
196
+ -W ........ --HILITE-UNREAD
197
+ Highlight first new line after any forward movement.
198
+ -x [_N[,...]] --tabs=[_N[,...]]
199
+ Set tab stops.
200
+ -X ........ --no-init
201
+ Don't use termcap init/deinit strings.
202
+ -y [_N] .... --max-forw-scroll=[_N]
203
+ Forward scroll limit.
204
+ -z [_N] .... --window=[_N]
205
+ Set size of window.
206
+ -" [_c[_c]] . --quotes=[_c[_c]]
207
+ Set shell quote characters.
208
+ -~ ........ --tilde
209
+ Don't display tildes after end of file.
210
+ -# [_N] .... --shift=[_N]
211
+ Set horizontal scroll amount (0 = one half screen width).
212
+ --exit-follow-on-close
213
+ Exit F command on a pipe when writer closes pipe.
214
+ --file-size
215
+ Automatically determine the size of the input file.
216
+ --follow-name
217
+ The F command changes files if the input file is renamed.
218
+ --header=[_N[,_M]]
219
+ Use N lines and M columns to display file headers.
220
+ --incsearch
221
+ Search file as each pattern character is typed in.
222
+ --intr=_C
223
+ Use _C instead of ^X to interrupt a read.
224
+ --line-num-width=_N
225
+ Set the width of the -N line number field to _N characters.
226
+ --modelines=_N
227
+ Read _N lines from the input file and look for vim modelines.
228
+ --mouse
229
+ Enable mouse input.
230
+ --no-keypad
231
+ Don't send termcap keypad init/deinit strings.
232
+ --no-histdups
233
+ Remove duplicates from command history.
234
+ --no-number-headers
235
+ Don't give line numbers to header lines.
236
+ --no-search-headers
237
+ Don't search in header lines or columns.
238
+ --no-vbell
239
+ Disable the terminal's visual bell.
240
+ --redraw-on-quit
241
+ Redraw final screen when quitting.
242
+ --rscroll=_C
243
+ Set the character used to mark truncated lines.
244
+ --save-marks
245
+ Retain marks across invocations of less.
246
+ --search-options=[EFKNRW-]
247
+ Set default options for every search.
248
+ --show-preproc-errors
249
+ Display a message if preprocessor exits with an error status.
250
+ --proc-backspace
251
+ Process backspaces for bold/underline.
252
+ --SPECIAL-BACKSPACE
253
+ Treat backspaces as control characters.
254
+ --proc-return
255
+ Delete carriage returns before newline.
256
+ --SPECIAL-RETURN
257
+ Treat carriage returns as control characters.
258
+ --proc-tab
259
+ Expand tabs to spaces.
260
+ --SPECIAL-TAB
261
+ Treat tabs as control characters.
262
+ --status-col-width=_N
263
+ Set the width of the -J status column to _N characters.
264
+ --status-line
265
+ Highlight or color the entire line containing a mark.
266
+ --use-backslash
267
+ Subsequent options use backslash as escape char.
268
+ --use-color
269
+ Enables colored text.
270
+ --wheel-lines=_N
271
+ Each click of the mouse wheel moves _N lines.
272
+ --wordwrap
273
+ Wrap lines at spaces.
274
+
275
+
276
+ ---------------------------------------------------------------------------
277
+
278
+ LLIINNEE EEDDIITTIINNGG
279
+
280
+ These keys can be used to edit text being entered
281
+ on the "command line" at the bottom of the screen.
282
+
283
+ RightArrow ..................... ESC-l ... Move cursor right one character.
284
+ LeftArrow ...................... ESC-h ... Move cursor left one character.
285
+ ctrl-RightArrow ESC-RightArrow ESC-w ... Move cursor right one word.
286
+ ctrl-LeftArrow ESC-LeftArrow ESC-b ... Move cursor left one word.
287
+ HOME ........................... ESC-0 ... Move cursor to start of line.
288
+ END ............................ ESC-$ ... Move cursor to end of line.
289
+ BACKSPACE ................................ Delete char to left of cursor.
290
+ DELETE ......................... ESC-x ... Delete char under cursor.
291
+ ctrl-BACKSPACE ESC-BACKSPACE ........... Delete word to left of cursor.
292
+ ctrl-DELETE .... ESC-DELETE .... ESC-X ... Delete word under cursor.
293
+ ctrl-U ......... ESC (MS-DOS only) ....... Delete entire line.
294
+ UpArrow ........................ ESC-k ... Retrieve previous command line.
295
+ DownArrow ...................... ESC-j ... Retrieve next command line.
296
+ TAB ...................................... Complete filename & cycle.
297
+ SHIFT-TAB ...................... ESC-TAB Complete filename & reverse cycle.
298
+ ctrl-L ................................... Complete filename, list all.
@@ -13,6 +13,7 @@ if (( $# == 3 )); then
13
13
  echo 'Updating Gems to Latest Versions in Gemfile...'
14
14
  ./find_latest_gem_versions_per_Gemfile.sh
15
15
  pwn_autoinc_version
16
+ pwn_rdoc_to_jsonl --rdoc-root-dir '/opt/pwn/rdoc/PWN' --jsonl-results '/opt/pwn/third_party/pwn_rdoc.jsonl'
16
17
 
17
18
  # Tag for every 100 commits (i.e. 0.1.100, 0.1.200, etc)
18
19
  tag_this_version_bool=`ruby -r 'pwn' -e 'if (PWN::VERSION.split(".")[-1].to_i + 1) % 100 == 0; then print true; else print false; end'`
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.215'
4
+ VERSION = '0.5.216'
5
5
  end