pwntools 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +88 -11
- data/Rakefile +5 -1
- data/lib/pwn.rb +9 -7
- data/lib/pwnlib/abi.rb +60 -0
- data/lib/pwnlib/asm.rb +146 -0
- data/lib/pwnlib/constants/constant.rb +16 -2
- data/lib/pwnlib/constants/constants.rb +35 -19
- data/lib/pwnlib/constants/linux/amd64.rb +30 -1
- data/lib/pwnlib/context.rb +25 -17
- data/lib/pwnlib/dynelf.rb +117 -54
- data/lib/pwnlib/elf/elf.rb +267 -0
- data/lib/pwnlib/ext/helper.rb +4 -4
- data/lib/pwnlib/logger.rb +87 -0
- data/lib/pwnlib/memleak.rb +58 -29
- data/lib/pwnlib/pwn.rb +19 -8
- data/lib/pwnlib/reg_sort.rb +102 -108
- data/lib/pwnlib/shellcraft/generators/amd64/common/common.rb +14 -0
- data/lib/pwnlib/shellcraft/generators/amd64/common/infloop.rb +17 -0
- data/lib/pwnlib/shellcraft/generators/amd64/common/memcpy.rb +31 -0
- data/lib/pwnlib/shellcraft/generators/amd64/common/mov.rb +127 -0
- data/lib/pwnlib/shellcraft/generators/amd64/common/nop.rb +16 -0
- data/lib/pwnlib/shellcraft/generators/amd64/common/popad.rb +27 -0
- data/lib/pwnlib/shellcraft/generators/amd64/common/pushstr.rb +64 -0
- data/lib/pwnlib/shellcraft/generators/amd64/common/pushstr_array.rb +19 -0
- data/lib/pwnlib/shellcraft/generators/amd64/common/ret.rb +32 -0
- data/lib/pwnlib/shellcraft/generators/amd64/common/setregs.rb +19 -0
- data/lib/pwnlib/shellcraft/generators/amd64/linux/execve.rb +21 -0
- data/lib/pwnlib/shellcraft/generators/amd64/linux/linux.rb +14 -0
- data/lib/pwnlib/shellcraft/generators/amd64/linux/ls.rb +19 -0
- data/lib/pwnlib/shellcraft/generators/amd64/linux/sh.rb +19 -0
- data/lib/pwnlib/shellcraft/generators/amd64/linux/syscall.rb +21 -0
- data/lib/pwnlib/shellcraft/generators/helper.rb +106 -0
- data/lib/pwnlib/shellcraft/generators/i386/common/common.rb +14 -0
- data/lib/pwnlib/shellcraft/generators/i386/common/infloop.rb +17 -0
- data/lib/pwnlib/shellcraft/generators/i386/common/mov.rb +90 -0
- data/lib/pwnlib/shellcraft/generators/i386/common/nop.rb +16 -0
- data/lib/pwnlib/shellcraft/generators/i386/common/pushstr.rb +39 -0
- data/lib/pwnlib/shellcraft/generators/i386/common/pushstr_array.rb +19 -0
- data/lib/pwnlib/shellcraft/generators/i386/common/setregs.rb +19 -0
- data/lib/pwnlib/shellcraft/generators/i386/linux/execve.rb +19 -0
- data/lib/pwnlib/shellcraft/generators/i386/linux/linux.rb +14 -0
- data/lib/pwnlib/shellcraft/generators/i386/linux/ls.rb +19 -0
- data/lib/pwnlib/shellcraft/generators/i386/linux/sh.rb +19 -0
- data/lib/pwnlib/shellcraft/generators/i386/linux/syscall.rb +19 -0
- data/lib/pwnlib/shellcraft/generators/x86/common/common.rb +26 -0
- data/lib/pwnlib/shellcraft/generators/x86/common/infloop.rb +22 -0
- data/lib/pwnlib/shellcraft/generators/x86/common/mov.rb +15 -0
- data/lib/pwnlib/shellcraft/generators/x86/common/pushstr.rb +15 -0
- data/lib/pwnlib/shellcraft/generators/x86/common/pushstr_array.rb +85 -0
- data/lib/pwnlib/shellcraft/generators/x86/common/setregs.rb +82 -0
- data/lib/pwnlib/shellcraft/generators/x86/linux/execve.rb +69 -0
- data/lib/pwnlib/shellcraft/generators/x86/linux/linux.rb +14 -0
- data/lib/pwnlib/shellcraft/generators/x86/linux/ls.rb +66 -0
- data/lib/pwnlib/shellcraft/generators/x86/linux/sh.rb +52 -0
- data/lib/pwnlib/shellcraft/generators/x86/linux/syscall.rb +52 -0
- data/lib/pwnlib/shellcraft/registers.rb +145 -0
- data/lib/pwnlib/shellcraft/shellcraft.rb +67 -0
- data/lib/pwnlib/timer.rb +60 -0
- data/lib/pwnlib/tubes/buffer.rb +96 -0
- data/lib/pwnlib/tubes/sock.rb +95 -0
- data/lib/pwnlib/tubes/tube.rb +270 -0
- data/lib/pwnlib/util/cyclic.rb +95 -94
- data/lib/pwnlib/util/fiddling.rb +256 -220
- data/lib/pwnlib/util/getdents.rb +83 -0
- data/lib/pwnlib/util/hexdump.rb +109 -108
- data/lib/pwnlib/util/lists.rb +55 -0
- data/lib/pwnlib/util/packing.rb +226 -228
- data/lib/pwnlib/util/ruby.rb +18 -0
- data/lib/pwnlib/version.rb +2 -1
- data/test/abi_test.rb +21 -0
- data/test/asm_test.rb +104 -0
- data/test/constants/constant_test.rb +1 -0
- data/test/constants/constants_test.rb +4 -2
- data/test/context_test.rb +1 -0
- data/test/data/echo.rb +20 -0
- data/test/data/elfs/Makefile +22 -0
- data/test/data/elfs/amd64.frelro.elf +0 -0
- data/test/data/elfs/amd64.frelro.pie.elf +0 -0
- data/test/data/elfs/amd64.nrelro.elf +0 -0
- data/test/data/elfs/amd64.prelro.elf +0 -0
- data/test/data/elfs/i386.frelro.pie.elf +0 -0
- data/test/data/elfs/i386.prelro.elf +0 -0
- data/test/data/elfs/source.cpp +19 -0
- data/test/data/flag +1 -0
- data/test/data/lib32/ld.so.2 +0 -0
- data/test/data/lib32/libc.so.6 +0 -0
- data/test/data/lib64/ld.so.2 +0 -0
- data/test/data/lib64/libc.so.6 +0 -0
- data/test/dynelf_test.rb +59 -24
- data/test/elf/elf_test.rb +120 -0
- data/test/ext_test.rb +3 -2
- data/test/files/use_pwnlib.rb +1 -1
- data/test/logger_test.rb +61 -0
- data/test/memleak_test.rb +4 -33
- data/test/reg_sort_test.rb +3 -1
- data/test/shellcraft/infloop_test.rb +26 -0
- data/test/shellcraft/linux/ls_test.rb +108 -0
- data/test/shellcraft/linux/sh_test.rb +119 -0
- data/test/shellcraft/linux/syscalls/execve_test.rb +136 -0
- data/test/shellcraft/linux/syscalls/syscall_test.rb +83 -0
- data/test/shellcraft/memcpy_test.rb +35 -0
- data/test/shellcraft/mov_test.rb +98 -0
- data/test/shellcraft/nop_test.rb +26 -0
- data/test/shellcraft/popad_test.rb +29 -0
- data/test/shellcraft/pushstr_array_test.rb +91 -0
- data/test/shellcraft/pushstr_test.rb +108 -0
- data/test/shellcraft/registers_test.rb +32 -0
- data/test/shellcraft/ret_test.rb +30 -0
- data/test/shellcraft/setregs_test.rb +62 -0
- data/test/shellcraft/shellcraft_test.rb +28 -0
- data/test/test_helper.rb +12 -1
- data/test/timer_test.rb +23 -0
- data/test/tubes/buffer_test.rb +45 -0
- data/test/tubes/sock_test.rb +68 -0
- data/test/tubes/tube_test.rb +241 -0
- data/test/util/cyclic_test.rb +2 -1
- data/test/util/fiddling_test.rb +2 -1
- data/test/util/getdents_test.rb +32 -0
- data/test/util/hexdump_test.rb +7 -9
- data/test/util/lists_test.rb +21 -0
- data/test/util/packing_test.rb +4 -3
- metadata +215 -25
data/test/util/cyclic_test.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# encoding: ASCII-8BIT
|
2
2
|
|
3
3
|
require 'test_helper'
|
4
|
+
|
4
5
|
require 'pwnlib/util/cyclic'
|
5
6
|
|
6
7
|
class CyclicTest < MiniTest::Test
|
7
|
-
include ::Pwnlib::Util::Cyclic
|
8
|
+
include ::Pwnlib::Util::Cyclic
|
8
9
|
|
9
10
|
def test_cyclic
|
10
11
|
assert_equal('AAABAACABBABCACBACCBBBCBCCC', cyclic(alphabet: 'ABC', n: 3))
|
data/test/util/fiddling_test.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# encoding: ASCII-8BIT
|
2
2
|
|
3
3
|
require 'test_helper'
|
4
|
+
|
4
5
|
require 'pwnlib/util/fiddling'
|
5
6
|
|
6
7
|
class FiddlingTest < MiniTest::Test
|
7
|
-
include ::Pwnlib::Util::Fiddling
|
8
|
+
include ::Pwnlib::Util::Fiddling
|
8
9
|
|
9
10
|
def test_enhex
|
10
11
|
assert_equal('4141313233', enhex('AA123'))
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
require 'pwnlib/context'
|
6
|
+
require 'pwnlib/util/getdents'
|
7
|
+
|
8
|
+
class GetdentsTest < MiniTest::Test
|
9
|
+
include ::Pwnlib::Context
|
10
|
+
include ::Pwnlib::Util::Getdents
|
11
|
+
|
12
|
+
def test_parse
|
13
|
+
context.local(arch: 'i386') do
|
14
|
+
assert_equal("REG README.md\nDIR lib\n",
|
15
|
+
parse("\x92\x22\x0e\x01\x8f\x4a\xb3\x41" \
|
16
|
+
"\x18\x00\x52\x45\x41\x44\x4d\x45" \
|
17
|
+
"\x2e\x6d\x64\x00\x30\x00\x00\x08" \
|
18
|
+
"\xb5\x10\x34\x01\xff\xff\xff\x7f" \
|
19
|
+
"\x10\x00\x6c\x69\x62\x00\x00\x04"))
|
20
|
+
end
|
21
|
+
context.local(arch: 'amd64') do
|
22
|
+
assert_equal("REG README.md\nDIR lib\n",
|
23
|
+
parse("\x92\x22\x0e\x01\x00\x00\x00\x00" \
|
24
|
+
"\x3d\xf6\x7c\x45\x8f\x4a\xb3\x41" \
|
25
|
+
"\x20\x00\x52\x45\x41\x44\x4d\x45" \
|
26
|
+
"\x2e\x6d\x64\x00\x30\x00\x00\x08" \
|
27
|
+
"\xb5\x10\x34\x01\x00\x00\x00\x00" \
|
28
|
+
"\xff\xff\xff\xff\xff\xff\xff\x7f" \
|
29
|
+
"\x18\x00\x6c\x69\x62\x00\x00\x04"))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/test/util/hexdump_test.rb
CHANGED
@@ -1,15 +1,13 @@
|
|
1
|
-
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
# This test use UTF-8 encoding for strings since the output for hexdump contains lots of UTF-8 characters.
|
2
4
|
|
3
5
|
require 'test_helper'
|
6
|
+
|
4
7
|
require 'pwnlib/util/hexdump'
|
5
8
|
|
6
9
|
class HexDumpTest < MiniTest::Test
|
7
|
-
include ::Pwnlib::Util::HexDump
|
8
|
-
|
9
|
-
def setup
|
10
|
-
# Default to disable coloring for easier testing.
|
11
|
-
Rainbow.enabled = false
|
12
|
-
end
|
10
|
+
include ::Pwnlib::Util::HexDump
|
13
11
|
|
14
12
|
def assert_lines_equal(s1, s2)
|
15
13
|
s1l = s1.chomp.lines
|
@@ -151,13 +149,13 @@ class HexDumpTest < MiniTest::Test
|
|
151
149
|
orig_style = HIGHLIGHT_STYLE
|
152
150
|
begin
|
153
151
|
$VERBOSE = nil
|
154
|
-
::Pwnlib::Util::HexDump
|
152
|
+
::Pwnlib::Util::HexDump.const_set(:HIGHLIGHT_STYLE, ->(s) { "#{s}!" })
|
155
153
|
assert_lines_equal(<<-'EOS', hexdump('abcdefghi', highlight: 'aeiou'))
|
156
154
|
00000000 61! 62 63 64 65! 66 67 68 69! │a!bcd│e!fgh│i!│
|
157
155
|
00000009
|
158
156
|
EOS
|
159
157
|
ensure
|
160
|
-
::Pwnlib::Util::HexDump
|
158
|
+
::Pwnlib::Util::HexDump.const_set(:HIGHLIGHT_STYLE, orig_style)
|
161
159
|
$VERBOSE = orig_verbose
|
162
160
|
end
|
163
161
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# encoding: ASCII-8BIT
|
2
|
+
|
3
|
+
require 'test_helper'
|
4
|
+
|
5
|
+
require 'pwnlib/util/lists'
|
6
|
+
|
7
|
+
class FiddlingTest < MiniTest::Test
|
8
|
+
include ::Pwnlib::Util::Lists
|
9
|
+
|
10
|
+
def test_slice
|
11
|
+
assert_equal(%w(A B C D), slice(1, 'ABCD'))
|
12
|
+
assert_equal(%w(AB CD E), slice(2, 'ABCDE'))
|
13
|
+
assert_equal(%w(AB CD), slice(2, 'ABCDE', underfull_action: :drop))
|
14
|
+
assert_equal(%w(AB CD EX), slice(2, 'ABCDE', underfull_action: :fill, fill_value: 'X'))
|
15
|
+
assert_equal(%w(AB CD EF), slice(2, 'ABCDEF', underfull_action: :fill, fill_value: 'X'))
|
16
|
+
err = assert_raises(ArgumentError) { slice(2, 'ABCDE', underfull_action: :pusheen) }
|
17
|
+
assert_equal('underfull_action expect to be one of :ignore, :drop, and :fill', err.message)
|
18
|
+
err = assert_raises(ArgumentError) { slice(2, 'ABCDE', underfull_action: :fill, fill_value: nil) }
|
19
|
+
assert_equal('fill_value must be a character', err.message)
|
20
|
+
end
|
21
|
+
end
|
data/test/util/packing_test.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# encoding: ASCII-8BIT
|
2
2
|
|
3
3
|
require 'test_helper'
|
4
|
+
|
4
5
|
require 'pwnlib/util/packing'
|
5
6
|
|
6
7
|
class PackingTest < MiniTest::Test
|
7
|
-
include ::Pwnlib::Util::Packing
|
8
|
+
include ::Pwnlib::Util::Packing
|
8
9
|
|
9
10
|
def test_pack
|
10
11
|
assert_equal('ABC',
|
@@ -115,8 +116,8 @@ class PackingTest < MiniTest::Test
|
|
115
116
|
def test_up_rand
|
116
117
|
srand(217)
|
117
118
|
[8, 16, 32, 64].each do |sz|
|
118
|
-
u = ->(*x) { public_send("u#{sz}", *x) }
|
119
|
-
p = ->(*x) { public_send("p#{sz}", *x) }
|
119
|
+
u = ->(*x) { ::Pwnlib::Util::Packing.public_send("u#{sz}", *x) }
|
120
|
+
p = ->(*x) { ::Pwnlib::Util::Packing.public_send("p#{sz}", *x) }
|
120
121
|
100.times do
|
121
122
|
limit = (1 << sz)
|
122
123
|
val = rand(0...limit)
|
metadata
CHANGED
@@ -1,16 +1,73 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pwntools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- peter50216@gmail.com
|
8
8
|
- david942j@gmail.com
|
9
|
+
- hanhan0912@gmail.com
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2017-10-17 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: crabstone
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - "~>"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - "~>"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '3'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: dentaku
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - "~>"
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 2.0.11
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 2.0.11
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: elftools
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 1.0.1
|
50
|
+
type: :runtime
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 1.0.1
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: keystone-engine
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0.9'
|
64
|
+
type: :runtime
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - "~>"
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0.9'
|
14
71
|
- !ruby/object:Gem::Dependency
|
15
72
|
name: rainbow
|
16
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -43,16 +100,16 @@ dependencies:
|
|
43
100
|
name: minitest
|
44
101
|
requirement: !ruby/object:Gem::Requirement
|
45
102
|
requirements:
|
46
|
-
- -
|
103
|
+
- - '='
|
47
104
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
105
|
+
version: 5.10.1
|
49
106
|
type: :development
|
50
107
|
prerelease: false
|
51
108
|
version_requirements: !ruby/object:Gem::Requirement
|
52
109
|
requirements:
|
53
|
-
- -
|
110
|
+
- - '='
|
54
111
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
112
|
+
version: 5.10.1
|
56
113
|
- !ruby/object:Gem::Dependency
|
57
114
|
name: pry
|
58
115
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,42 +130,42 @@ dependencies:
|
|
73
130
|
requirements:
|
74
131
|
- - "~>"
|
75
132
|
- !ruby/object:Gem::Version
|
76
|
-
version: '12.
|
133
|
+
version: '12.1'
|
77
134
|
type: :development
|
78
135
|
prerelease: false
|
79
136
|
version_requirements: !ruby/object:Gem::Requirement
|
80
137
|
requirements:
|
81
138
|
- - "~>"
|
82
139
|
- !ruby/object:Gem::Version
|
83
|
-
version: '12.
|
140
|
+
version: '12.1'
|
84
141
|
- !ruby/object:Gem::Dependency
|
85
142
|
name: rubocop
|
86
143
|
requirement: !ruby/object:Gem::Requirement
|
87
144
|
requirements:
|
88
145
|
- - "~>"
|
89
146
|
- !ruby/object:Gem::Version
|
90
|
-
version: '0.
|
147
|
+
version: '0.49'
|
91
148
|
type: :development
|
92
149
|
prerelease: false
|
93
150
|
version_requirements: !ruby/object:Gem::Requirement
|
94
151
|
requirements:
|
95
152
|
- - "~>"
|
96
153
|
- !ruby/object:Gem::Version
|
97
|
-
version: '0.
|
154
|
+
version: '0.49'
|
98
155
|
- !ruby/object:Gem::Dependency
|
99
156
|
name: simplecov
|
100
157
|
requirement: !ruby/object:Gem::Requirement
|
101
158
|
requirements:
|
102
159
|
- - "~>"
|
103
160
|
- !ruby/object:Gem::Version
|
104
|
-
version: '0.
|
161
|
+
version: '0.15'
|
105
162
|
type: :development
|
106
163
|
prerelease: false
|
107
164
|
version_requirements: !ruby/object:Gem::Requirement
|
108
165
|
requirements:
|
109
166
|
- - "~>"
|
110
167
|
- !ruby/object:Gem::Version
|
111
|
-
version: '0.
|
168
|
+
version: '0.15'
|
112
169
|
- !ruby/object:Gem::Dependency
|
113
170
|
name: tty-platform
|
114
171
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,7 +199,10 @@ description: |2
|
|
142
199
|
Implement useful/easy functions first,
|
143
200
|
try to be of ruby style and don't follow original pwntools everywhere.
|
144
201
|
Would still try to have similar name whenever possible.
|
145
|
-
email:
|
202
|
+
email:
|
203
|
+
- peter50216@gmail.com
|
204
|
+
- david942j@gmail.com
|
205
|
+
- hanhan0912@gmail.com
|
146
206
|
executables: []
|
147
207
|
extensions: []
|
148
208
|
extra_rdoc_files: []
|
@@ -150,43 +210,134 @@ files:
|
|
150
210
|
- README.md
|
151
211
|
- Rakefile
|
152
212
|
- lib/pwn.rb
|
213
|
+
- lib/pwnlib/abi.rb
|
214
|
+
- lib/pwnlib/asm.rb
|
153
215
|
- lib/pwnlib/constants/constant.rb
|
154
216
|
- lib/pwnlib/constants/constants.rb
|
155
217
|
- lib/pwnlib/constants/linux/amd64.rb
|
156
218
|
- lib/pwnlib/constants/linux/i386.rb
|
157
219
|
- lib/pwnlib/context.rb
|
158
220
|
- lib/pwnlib/dynelf.rb
|
221
|
+
- lib/pwnlib/elf/elf.rb
|
159
222
|
- lib/pwnlib/ext/array.rb
|
160
223
|
- lib/pwnlib/ext/helper.rb
|
161
224
|
- lib/pwnlib/ext/integer.rb
|
162
225
|
- lib/pwnlib/ext/string.rb
|
226
|
+
- lib/pwnlib/logger.rb
|
163
227
|
- lib/pwnlib/memleak.rb
|
164
228
|
- lib/pwnlib/pwn.rb
|
165
229
|
- lib/pwnlib/reg_sort.rb
|
230
|
+
- lib/pwnlib/shellcraft/generators/amd64/common/common.rb
|
231
|
+
- lib/pwnlib/shellcraft/generators/amd64/common/infloop.rb
|
232
|
+
- lib/pwnlib/shellcraft/generators/amd64/common/memcpy.rb
|
233
|
+
- lib/pwnlib/shellcraft/generators/amd64/common/mov.rb
|
234
|
+
- lib/pwnlib/shellcraft/generators/amd64/common/nop.rb
|
235
|
+
- lib/pwnlib/shellcraft/generators/amd64/common/popad.rb
|
236
|
+
- lib/pwnlib/shellcraft/generators/amd64/common/pushstr.rb
|
237
|
+
- lib/pwnlib/shellcraft/generators/amd64/common/pushstr_array.rb
|
238
|
+
- lib/pwnlib/shellcraft/generators/amd64/common/ret.rb
|
239
|
+
- lib/pwnlib/shellcraft/generators/amd64/common/setregs.rb
|
240
|
+
- lib/pwnlib/shellcraft/generators/amd64/linux/execve.rb
|
241
|
+
- lib/pwnlib/shellcraft/generators/amd64/linux/linux.rb
|
242
|
+
- lib/pwnlib/shellcraft/generators/amd64/linux/ls.rb
|
243
|
+
- lib/pwnlib/shellcraft/generators/amd64/linux/sh.rb
|
244
|
+
- lib/pwnlib/shellcraft/generators/amd64/linux/syscall.rb
|
245
|
+
- lib/pwnlib/shellcraft/generators/helper.rb
|
246
|
+
- lib/pwnlib/shellcraft/generators/i386/common/common.rb
|
247
|
+
- lib/pwnlib/shellcraft/generators/i386/common/infloop.rb
|
248
|
+
- lib/pwnlib/shellcraft/generators/i386/common/mov.rb
|
249
|
+
- lib/pwnlib/shellcraft/generators/i386/common/nop.rb
|
250
|
+
- lib/pwnlib/shellcraft/generators/i386/common/pushstr.rb
|
251
|
+
- lib/pwnlib/shellcraft/generators/i386/common/pushstr_array.rb
|
252
|
+
- lib/pwnlib/shellcraft/generators/i386/common/setregs.rb
|
253
|
+
- lib/pwnlib/shellcraft/generators/i386/linux/execve.rb
|
254
|
+
- lib/pwnlib/shellcraft/generators/i386/linux/linux.rb
|
255
|
+
- lib/pwnlib/shellcraft/generators/i386/linux/ls.rb
|
256
|
+
- lib/pwnlib/shellcraft/generators/i386/linux/sh.rb
|
257
|
+
- lib/pwnlib/shellcraft/generators/i386/linux/syscall.rb
|
258
|
+
- lib/pwnlib/shellcraft/generators/x86/common/common.rb
|
259
|
+
- lib/pwnlib/shellcraft/generators/x86/common/infloop.rb
|
260
|
+
- lib/pwnlib/shellcraft/generators/x86/common/mov.rb
|
261
|
+
- lib/pwnlib/shellcraft/generators/x86/common/pushstr.rb
|
262
|
+
- lib/pwnlib/shellcraft/generators/x86/common/pushstr_array.rb
|
263
|
+
- lib/pwnlib/shellcraft/generators/x86/common/setregs.rb
|
264
|
+
- lib/pwnlib/shellcraft/generators/x86/linux/execve.rb
|
265
|
+
- lib/pwnlib/shellcraft/generators/x86/linux/linux.rb
|
266
|
+
- lib/pwnlib/shellcraft/generators/x86/linux/ls.rb
|
267
|
+
- lib/pwnlib/shellcraft/generators/x86/linux/sh.rb
|
268
|
+
- lib/pwnlib/shellcraft/generators/x86/linux/syscall.rb
|
269
|
+
- lib/pwnlib/shellcraft/registers.rb
|
270
|
+
- lib/pwnlib/shellcraft/shellcraft.rb
|
271
|
+
- lib/pwnlib/timer.rb
|
272
|
+
- lib/pwnlib/tubes/buffer.rb
|
273
|
+
- lib/pwnlib/tubes/sock.rb
|
274
|
+
- lib/pwnlib/tubes/tube.rb
|
166
275
|
- lib/pwnlib/util/cyclic.rb
|
167
276
|
- lib/pwnlib/util/fiddling.rb
|
277
|
+
- lib/pwnlib/util/getdents.rb
|
168
278
|
- lib/pwnlib/util/hexdump.rb
|
279
|
+
- lib/pwnlib/util/lists.rb
|
169
280
|
- lib/pwnlib/util/packing.rb
|
281
|
+
- lib/pwnlib/util/ruby.rb
|
170
282
|
- lib/pwnlib/version.rb
|
283
|
+
- test/abi_test.rb
|
284
|
+
- test/asm_test.rb
|
171
285
|
- test/constants/constant_test.rb
|
172
286
|
- test/constants/constants_test.rb
|
173
287
|
- test/context_test.rb
|
288
|
+
- test/data/echo.rb
|
289
|
+
- test/data/elfs/Makefile
|
290
|
+
- test/data/elfs/amd64.frelro.elf
|
291
|
+
- test/data/elfs/amd64.frelro.pie.elf
|
292
|
+
- test/data/elfs/amd64.nrelro.elf
|
293
|
+
- test/data/elfs/amd64.prelro.elf
|
294
|
+
- test/data/elfs/i386.frelro.pie.elf
|
295
|
+
- test/data/elfs/i386.prelro.elf
|
296
|
+
- test/data/elfs/source.cpp
|
297
|
+
- test/data/flag
|
298
|
+
- test/data/lib32/ld.so.2
|
299
|
+
- test/data/lib32/libc.so.6
|
300
|
+
- test/data/lib64/ld.so.2
|
301
|
+
- test/data/lib64/libc.so.6
|
174
302
|
- test/data/victim.c
|
175
303
|
- test/data/victim32
|
176
304
|
- test/data/victim64
|
177
305
|
- test/dynelf_test.rb
|
306
|
+
- test/elf/elf_test.rb
|
178
307
|
- test/ext_test.rb
|
179
308
|
- test/files/use_pwn.rb
|
180
309
|
- test/files/use_pwnlib.rb
|
181
310
|
- test/full_file_test.rb
|
311
|
+
- test/logger_test.rb
|
182
312
|
- test/memleak_test.rb
|
183
313
|
- test/reg_sort_test.rb
|
314
|
+
- test/shellcraft/infloop_test.rb
|
315
|
+
- test/shellcraft/linux/ls_test.rb
|
316
|
+
- test/shellcraft/linux/sh_test.rb
|
317
|
+
- test/shellcraft/linux/syscalls/execve_test.rb
|
318
|
+
- test/shellcraft/linux/syscalls/syscall_test.rb
|
319
|
+
- test/shellcraft/memcpy_test.rb
|
320
|
+
- test/shellcraft/mov_test.rb
|
321
|
+
- test/shellcraft/nop_test.rb
|
322
|
+
- test/shellcraft/popad_test.rb
|
323
|
+
- test/shellcraft/pushstr_array_test.rb
|
324
|
+
- test/shellcraft/pushstr_test.rb
|
325
|
+
- test/shellcraft/registers_test.rb
|
326
|
+
- test/shellcraft/ret_test.rb
|
327
|
+
- test/shellcraft/setregs_test.rb
|
328
|
+
- test/shellcraft/shellcraft_test.rb
|
184
329
|
- test/test_helper.rb
|
330
|
+
- test/timer_test.rb
|
331
|
+
- test/tubes/buffer_test.rb
|
332
|
+
- test/tubes/sock_test.rb
|
333
|
+
- test/tubes/tube_test.rb
|
185
334
|
- test/util/cyclic_test.rb
|
186
335
|
- test/util/fiddling_test.rb
|
336
|
+
- test/util/getdents_test.rb
|
187
337
|
- test/util/hexdump_test.rb
|
338
|
+
- test/util/lists_test.rb
|
188
339
|
- test/util/packing_test.rb
|
189
|
-
homepage:
|
340
|
+
homepage: https://github.com/peter50216/pwntools-ruby
|
190
341
|
licenses:
|
191
342
|
- MIT
|
192
343
|
metadata: {}
|
@@ -211,21 +362,60 @@ signing_key:
|
|
211
362
|
specification_version: 4
|
212
363
|
summary: pwntools
|
213
364
|
test_files:
|
214
|
-
- test/
|
215
|
-
- test/
|
216
|
-
- test/
|
217
|
-
- test/
|
218
|
-
- test/
|
365
|
+
- test/data/elfs/amd64.frelro.pie.elf
|
366
|
+
- test/data/elfs/Makefile
|
367
|
+
- test/data/elfs/amd64.frelro.elf
|
368
|
+
- test/data/elfs/i386.frelro.pie.elf
|
369
|
+
- test/data/elfs/amd64.nrelro.elf
|
370
|
+
- test/data/elfs/i386.prelro.elf
|
371
|
+
- test/data/elfs/amd64.prelro.elf
|
372
|
+
- test/data/elfs/source.cpp
|
373
|
+
- test/data/victim32
|
219
374
|
- test/data/victim.c
|
220
375
|
- test/data/victim64
|
221
|
-
- test/data/
|
222
|
-
- test/
|
223
|
-
- test/
|
376
|
+
- test/data/lib32/ld.so.2
|
377
|
+
- test/data/lib32/libc.so.6
|
378
|
+
- test/data/lib64/ld.so.2
|
379
|
+
- test/data/lib64/libc.so.6
|
380
|
+
- test/data/flag
|
381
|
+
- test/data/echo.rb
|
382
|
+
- test/asm_test.rb
|
383
|
+
- test/test_helper.rb
|
224
384
|
- test/context_test.rb
|
225
|
-
- test/
|
385
|
+
- test/shellcraft/pushstr_array_test.rb
|
386
|
+
- test/shellcraft/memcpy_test.rb
|
387
|
+
- test/shellcraft/registers_test.rb
|
388
|
+
- test/shellcraft/ret_test.rb
|
389
|
+
- test/shellcraft/popad_test.rb
|
390
|
+
- test/shellcraft/nop_test.rb
|
391
|
+
- test/shellcraft/linux/ls_test.rb
|
392
|
+
- test/shellcraft/linux/sh_test.rb
|
393
|
+
- test/shellcraft/linux/syscalls/syscall_test.rb
|
394
|
+
- test/shellcraft/linux/syscalls/execve_test.rb
|
395
|
+
- test/shellcraft/shellcraft_test.rb
|
396
|
+
- test/shellcraft/pushstr_test.rb
|
397
|
+
- test/shellcraft/setregs_test.rb
|
398
|
+
- test/shellcraft/infloop_test.rb
|
399
|
+
- test/shellcraft/mov_test.rb
|
226
400
|
- test/constants/constants_test.rb
|
401
|
+
- test/constants/constant_test.rb
|
402
|
+
- test/reg_sort_test.rb
|
403
|
+
- test/logger_test.rb
|
227
404
|
- test/memleak_test.rb
|
228
|
-
- test/util/
|
405
|
+
- test/util/fiddling_test.rb
|
229
406
|
- test/util/hexdump_test.rb
|
407
|
+
- test/util/getdents_test.rb
|
408
|
+
- test/util/packing_test.rb
|
230
409
|
- test/util/cyclic_test.rb
|
231
|
-
- test/util/
|
410
|
+
- test/util/lists_test.rb
|
411
|
+
- test/timer_test.rb
|
412
|
+
- test/tubes/sock_test.rb
|
413
|
+
- test/tubes/buffer_test.rb
|
414
|
+
- test/tubes/tube_test.rb
|
415
|
+
- test/abi_test.rb
|
416
|
+
- test/files/use_pwnlib.rb
|
417
|
+
- test/files/use_pwn.rb
|
418
|
+
- test/ext_test.rb
|
419
|
+
- test/full_file_test.rb
|
420
|
+
- test/dynelf_test.rb
|
421
|
+
- test/elf/elf_test.rb
|