pwn 0.5.223 → 0.5.224

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: f62a1b15820e6b9a94bbd33ee42d416c4e15e8c19646a5f63143a148a83f5802
4
- data.tar.gz: 067743e36ba002ef16266a0c97de85c8eff3d80b385698898c1cf9268bf3157c
3
+ metadata.gz: 5f3053bc992855c9b715f45c3fcff263a3f57db584cd097f4e08ee8f4e25bf8b
4
+ data.tar.gz: 84a413505b53fd6f44acf96f37f4e289a6e3fa0ecdaa8ebf83d58a3819b5902f
5
5
  SHA512:
6
- metadata.gz: d7eb4993d27370f19fe5965981e385ab05eb366dfa53c1ca3154980e8c2cbe304b8c45e9b09220fc8c2d416efdb9edfd7284ee2201e772156de79e1a210532ee
7
- data.tar.gz: 67e3fe1caaf2f97af856679e2d9d7ef730518dded9db7b6f085715678a23522441ddae467445a97677de6517fc463ded1b9dfeb3846c4d6884198226cb30a4f3
6
+ metadata.gz: 41bcce03db3746b62b81956ee9005c13025399e18daa1ece513a0c83c7a3bf98258d30832982456675f5cccc8ba8eb56d62e3fe7adb60bb27614375c328914a8
7
+ data.tar.gz: 01c830874cf6badcf5fe365b0d6b2e01bc5c41f5a4c6ec22c62d0d597cdbea8c2d193b3b9d5d8a502b1989eef9bdc97e9e04ce4bc1bd35306772c76f17ff5675
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.223]:001 >>> PWN.help
40
+ pwn[v0.5.224]: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.223]:001 >>> PWN.help
55
+ pwn[v0.5.224]: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.223]:001 >>> PWN.help
65
+ pwn[v0.5.224]: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:
@@ -20,14 +20,7 @@ module PWN
20
20
  opcodes = opts[:opcodes]
21
21
  opcodes_always_string_obj = opts[:opcodes_always_string_obj] ||= false
22
22
  arch = opts[:arch] ||= PWN::Plugins::DetectOS.arch
23
- endian = opts[:endian]
24
-
25
- if opts[:endian].nil? && [1].pack('I') == [1].pack('N')
26
- endian = :big
27
- else
28
- endian = :little
29
- end
30
-
23
+ endian = opts[:endian] ||= PWN::Plugins::DetectOS.endian
31
24
  endian = endian.to_sym if opts[:endian]
32
25
 
33
26
  raise 'ERROR: opcodes parameter is required.' if opcodes.nil?
@@ -131,14 +124,7 @@ module PWN
131
124
  public_class_method def self.asm_to_opcodes(opts = {})
132
125
  asm = opts[:asm]
133
126
  arch = opts[:arch] ||= PWN::Plugins::DetectOS.arch
134
- endian = opts[:endian] ||= :little
135
-
136
- if opts[:endian].nil? && [1].pack('I') == [1].pack('N')
137
- endian = :big
138
- else
139
- endian = :little
140
- end
141
-
127
+ endian = opts[:endian] ||= PWN::Plugins::DetectOS.endian
142
128
  endian = endian.to_sym if opts[:endian]
143
129
 
144
130
  asm_tmp = Tempfile.new('pwn_asm')
@@ -32,6 +32,19 @@ module PWN
32
32
  raise e
33
33
  end
34
34
 
35
+ # Supported Method Parameters::
36
+ # PWN::Plugins::DetectOS.endian
37
+
38
+ public_class_method def self.endian
39
+ if [1].pack('I') == [1].pack('N')
40
+ :big
41
+ else
42
+ :little
43
+ end
44
+ rescue StandardError => e
45
+ raise e
46
+ end
47
+
35
48
  # Author(s):: 0day Inc. <support@0dayinc.com>
36
49
 
37
50
  public_class_method def self.authors
@@ -48,6 +61,8 @@ module PWN
48
61
 
49
62
  #{self}.arch
50
63
 
64
+ #{self}.endian
65
+
51
66
  #{self}.authors
52
67
  "
53
68
  end
@@ -31,8 +31,8 @@ module PWN
31
31
  dchars = "\001\e[33m\002***\001\e[0m\002" if mode == :splat
32
32
 
33
33
  if pi.config.pwn_asm
34
- arch = pi.config.pwn_asm_arch
35
- endian = pi.config.pwn_asm_endian
34
+ arch = pi.config.pwn_asm_arch ||= PWN::Plugins::DetectOS.arch
35
+ endian = pi.config.pwn_asm_endian ||= PWN::Plugins::DetectOS.endian
36
36
 
37
37
  pi.config.prompt_name = "pwn.asm:#{arch}/#{endian}"
38
38
  name = "\001\e[1m\002\001\e[37m\002#{pi.config.prompt_name}\001\e[0m\002"
@@ -549,15 +549,10 @@ module PWN
549
549
  pi.config.pwn_ai_temp = pi.config.p[ai_engine][:temp]
550
550
  Pry.config.pwn_ai_temp = pi.config.pwn_ai_temp
551
551
 
552
- pi.config.pwn_asm_arch = pi.config.p[:asm][:arch] ||= PWN::Plugins::DetectOS.arch
552
+ pi.config.pwn_asm_arch = pi.config.p[:asm][:arch]
553
553
  Pry.config.pwn_asm_arch = pi.config.pwn_asm_arch
554
554
 
555
555
  pi.config.pwn_asm_endian = pi.config.p[:asm][:endian]
556
- if pi.config.pwn_asm_endian.nil? && [1].pack('I') == [1].pack('N')
557
- pi.config.pwn_asm_endian = 'big'
558
- else
559
- pi.config.pwn_asm_endian = 'little'
560
- end
561
556
  Pry.config.pwn_asm_endian = pi.config.pwn_asm_endian
562
557
 
563
558
  pi.config.pwn_irc = pi.config.p[:irc]
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.223'
4
+ VERSION = '0.5.224'
5
5
  end
@@ -428,11 +428,11 @@
428
428
  {"messages":[{"role":"user","content":"PWN::Plugins::Android.screen_record Usage"},{"role":"assistant","content":"`PWN::Plugins::Android.screen_record`: Supported Method Parameters\n\nPWN::Plugins::Android.screen_record(\n\nadb_path: 'required - path to adb binary',\ndest: 'optional - destination path to save screen record file (defaults to /sdcard/screen.mp4)',\nas_root: 'optional - boolean (defaults to true)'\n\n)\n"}]}
429
429
  {"messages":[{"role":"user","content":"PWN::Plugins::Android.swipe Usage"},{"role":"assistant","content":"`PWN::Plugins::Android.swipe`: Supported Method Parameters\n\nPWN::Plugins::Android.swipe(\n\nadb_path: 'required - path to adb binary',\ndirection: 'required - direction to swipe (:up|:down|:left|:right)'\n\n)\n"}]}
430
430
  {"messages":[{"role":"user","content":"PWN::Plugins::Android.take_screenshot Usage"},{"role":"assistant","content":"`PWN::Plugins::Android.take_screenshot`: Supported Method Parameters\n\nPWN::Plugins::Android.take_screenshot(\n\nadb_path: 'required - path to adb binary',\ndest: 'optional - destination path to save screenshot file (defaults to /sdcard/screen.png)',\nas_root: 'optional - boolean (defaults to true)'\n\n)\n"}]}
431
- {"messages":[{"role":"user","content":"PWN::Plugins::Assembly.asm_to_opcodes Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.asm_to_opcodes`: Supported Method Parameters\n\nPWN::Plugins::Assembly.asm_to_opcodes(\n\nasm: 'required - assembly instruction(s) (e.g. 'nop\\nnop\\nnop\\njmp rsp\\n)',\narch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',\nendian: 'optional - endianess (defaults to :little)'\n\n)\n"}]}
431
+ {"messages":[{"role":"user","content":"PWN::Plugins::Assembly.asm_to_opcodes Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.asm_to_opcodes`: Supported Method Parameters\n\nPWN::Plugins::Assembly.asm_to_opcodes(\n\nasm: 'required - assembly instruction(s) (e.g. 'nop\\nnop\\nnop\\njmp rsp\\n)',\narch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',\nendian: 'optional - endianess :big|:little (defaults to current system endianess)'\n\n)\n"}]}
432
432
  {"messages":[{"role":"user","content":"PWN::Plugins::Assembly.authors Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
433
433
  {"messages":[{"role":"user","content":"PWN::Plugins::Assembly.help Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.help`: "}]}
434
434
  {"messages":[{"role":"user","content":"PWN::Plugins::Assembly.list_supported_archs Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.list_supported_archs`: Supported Method Parameters\n\nPWN::Plugins::Assembly.list_archs\n"}]}
435
- {"messages":[{"role":"user","content":"PWN::Plugins::Assembly.opcodes_to_asm Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.opcodes_to_asm`: Supported Method Parameters\n\nPWN::Plugins::Assembly.opcodes_to_asm(\n\nopcodes: 'required - hex escaped opcode(s) (e.g. \"\\x90\\x90\\x90\")',\nopcodes_always_string_obj: 'optional - always interpret opcodes passed in as a string object (defaults to false)',\narch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',\nendian: 'optional - endianess (defaults to :little)'\n\n)\n"}]}
435
+ {"messages":[{"role":"user","content":"PWN::Plugins::Assembly.opcodes_to_asm Usage"},{"role":"assistant","content":"`PWN::Plugins::Assembly.opcodes_to_asm`: Supported Method Parameters\n\nPWN::Plugins::Assembly.opcodes_to_asm(\n\nopcodes: 'required - hex escaped opcode(s) (e.g. \"\\x90\\x90\\x90\")',\nopcodes_always_string_obj: 'optional - always interpret opcodes passed in as a string object (defaults to false)',\narch: 'optional - architecture returned from objdump --info (defaults to PWN::Plugins::DetectOS.arch)',\nendian: 'optional - endianess :big|:little (defaults to current system endianess)'\n\n)\n"}]}
436
436
  {"messages":[{"role":"user","content":"PWN::Plugins::AuthenticationHelper.authors Usage"},{"role":"assistant","content":"`PWN::Plugins::AuthenticationHelper.authors`: Author(s)\n\n0day Inc. <support@0dayinc.com>\n"}]}
437
437
  {"messages":[{"role":"user","content":"PWN::Plugins::AuthenticationHelper.help Usage"},{"role":"assistant","content":"`PWN::Plugins::AuthenticationHelper.help`: "}]}
438
438
  {"messages":[{"role":"user","content":"PWN::Plugins::AuthenticationHelper.mask_password Usage"},{"role":"assistant","content":"`PWN::Plugins::AuthenticationHelper.mask_password`: Supported Method Parameters\n\nPWN::Plugins::AuthenticationHelper.mask_password(\n\nprompt: 'optional - string to display at prompt'\n\n)\n"}]}
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.5.223
4
+ version: 0.5.224
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.