pwn 0.4.394 → 0.4.396

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/bin/pwn +28 -20
  4. data/lib/pwn/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00fdd984c56c17e08366de15f8d1627da1a6fb193e55b6eb7a3648f75ab457e5
4
- data.tar.gz: 8807dcbe516537df70d8e3e73db1f0431b1390e3395a46bce5c0fc10b0d3499e
3
+ metadata.gz: 834d5ea1d9ec4022b881d453fa123d55e09c2adacaab3b6852c2f2fa3106b60d
4
+ data.tar.gz: 508478f12b0a2ae83ca041f52d7b636b1c34567b1b8dca13d63ceb7898e2a824
5
5
  SHA512:
6
- metadata.gz: 10a1926b599089ccc218a5cac4e60570cd7d9fb27a8ae39d6ab0fc170a24dcf4242f3d504e2ef023fb2c8b62150fe4bfa982bdb44cbbff4a88f8553626e09b40
7
- data.tar.gz: 1571134fce31b0218649722d6535d9918af3351f8e3a2cb40fadb3fb8b2a9ecfd554d713bc3662f01ada558294b7ca1e3464faf195867ceb60020378fdb0b69e
6
+ metadata.gz: 3e7c5fde7136dfb271becc97fc15680d42a4ff41bb719f88d4884a623f11f27cf33221707ecaaa85d7d5e0cc945d37115abde30782f05e736f1ad453eea6222d
7
+ data.tar.gz: 4ce2645863b4384a7ab0c1b4fa6c50a61559dfff32623ac03920dff9594429f0ec46320400ada782b23e67e3d0e8b17513badbc1b93985c974f17239e9f2bfc9
data/README.md CHANGED
@@ -37,7 +37,7 @@ $ rvm use ruby-3.1.1@pwn
37
37
  $ rvm list gemsets
38
38
  $ gem install --verbose pwn
39
39
  $ pwn
40
- pwn[v0.4.394]:001 >>> PWN.help
40
+ pwn[v0.4.396]: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.1.1@pwn
52
52
  $ gem uninstall --all --executables pwn
53
53
  $ gem install --verbose pwn
54
54
  $ pwn
55
- pwn[v0.4.394]:001 >>> PWN.help
55
+ pwn[v0.4.396]:001 >>> PWN.help
56
56
  ```
57
57
 
58
58
 
data/bin/pwn CHANGED
@@ -3,18 +3,25 @@
3
3
 
4
4
  require 'pwn'
5
5
  require 'pry'
6
- require 'tty-prompt'
7
- require 'tty-reader'
6
+ # require 'tty-prompt'
7
+ # require 'tty-reader'
8
8
 
9
9
  begin
10
10
  def gen_ps1_proc(opts = {})
11
11
  delim = opts[:delim]
12
12
 
13
13
  # Custom Main & Wait (Multi-Line) Prompts
14
- title = "\001\e[1m\002\001\e[31m\002pwn\001\e[0m\002" # Bold Red
15
- version = "\001\e[36m\002v#{PWN::VERSION}\001\e[0m\002" # Cyan
16
- dchars = "\001\e[32m\002>>>\001\e[0m\002" # Green
17
- dchars = "\001\e[33m\002***\001\e[0m\002" if delim == :splat # Yellow
14
+ # Bold Red Title
15
+ title = "\001\e[1m\002\001\e[31m\002pwn\001\e[0m\002"
16
+
17
+ # Cyan Version
18
+ version = "\001\e[36m\002v#{PWN::VERSION}\001\e[0m\002"
19
+
20
+ # Green Arrows
21
+ dchars = "\001\e[32m\002>>>\001\e[0m\002"
22
+
23
+ # Yellow Splats
24
+ dchars = "\001\e[33m\002***\001\e[0m\002" if delim == :splat
18
25
 
19
26
  proc do |_target_self, _nest_level, pry|
20
27
  pry.config.pwn_repl_line += 1
@@ -51,19 +58,7 @@ begin
51
58
  end
52
59
  end
53
60
 
54
- Pry.config.prompt_name = :pwn
55
- Pry.config.pwn_repl_line = 0
56
- Pry.config.tty_prompt = TTY::Prompt.new
57
- Pry.config.tty_reader = TTY::Reader.new
58
-
59
- Pry.config.hooks.add_hook(:before_session, :welcome) do |output, _binding, _pry|
60
- output.puts 'Use the #help method for more options.'
61
- output.puts 'e.g help'
62
- output.puts 'e.g PWN.help'
63
- output.puts 'e.g PWN::Plugins.help'
64
- output.puts 'e.g PWN::Plugins::TransparentBrowser.help'
65
- end
66
-
61
+ # Define Custom REPL Commands
67
62
  Pry::Commands.create_command 'toggle-pager' do
68
63
  description 'Toggle less on returned objects surpassing the terminal.'
69
64
 
@@ -73,16 +68,29 @@ begin
73
68
  end
74
69
  end
75
70
 
71
+ # Define REPL Hooks
72
+ Pry.config.hooks.add_hook(:before_session, :welcome) do |output, _binding, _pry|
73
+ output.puts 'Use the #help method for more options.'
74
+ output.puts 'e.g help'
75
+ output.puts 'e.g PWN.help'
76
+ output.puts 'e.g PWN::Plugins.help'
77
+ output.puts 'e.g PWN::Plugins::TransparentBrowser.help'
78
+ end
79
+
80
+ # Define PS1 Prompt
81
+ Pry.config.pwn_repl_line = 0
76
82
  arrow_ps1_proc = gen_ps1_proc
77
83
  splat_ps1_proc = gen_ps1_proc(delim: :splat)
78
84
  prompt_ps1 = [arrow_ps1_proc, splat_ps1_proc]
79
85
 
80
86
  pwn_prompt = Pry::Prompt.new(
81
87
  :pwn,
82
- 'PWN_PROTOTYPING_DRIVER',
88
+ 'PWN Prototyping REPL',
83
89
  prompt_ps1
84
90
  )
85
91
 
92
+ # Start PWN REPL
93
+ Pry.config.prompt_name = :pwn
86
94
  Pry.start(
87
95
  self,
88
96
  prompt: pwn_prompt
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.394'
4
+ VERSION = '0.4.396'
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.394
4
+ version: 0.4.396
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.