librex 0.0.42 → 0.0.43
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/lib/rex/compat.rb +10 -0
- data/lib/rex/post/meterpreter/channels/pools/file.rb +1 -1
- data/lib/rex/post/meterpreter/extensions/stdapi/fs/dir.rb +20 -18
- data/lib/rex/post/meterpreter/extensions/stdapi/fs/file.rb +11 -22
- data/lib/rex/post/meterpreter/extensions/stdapi/fs/file_stat.rb +2 -1
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun.rb.ts.rb +4 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb +27 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb.ut.rb +7 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_advapi32.rb +498 -242
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_iphlpapi.rb +18 -18
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_kernel32.rb +695 -694
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_netapi32.rb +6 -5
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_ntdll.rb +24 -24
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_shell32.rb +5 -4
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_user32.rb +551 -551
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_ws2_32.rb +93 -93
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb +56 -42
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll.rb.ut.rb +4 -4
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_helper.rb.ut.rb +5 -5
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_wrapper.rb +26 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/dll_wrapper.rb.ut.rb +63 -0
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/multicall.rb +4 -4
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/railgun.rb +151 -96
- data/lib/rex/post/meterpreter/extensions/stdapi/railgun/railgun.rb.ut.rb +80 -5
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/config.rb +3 -3
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb +11 -11
- data/lib/rex/post/meterpreter/extensions/stdapi/sys/registry.rb +3 -3
- data/lib/rex/post/meterpreter/packet.rb +12 -11
- data/lib/rex/proto/dhcp/server.rb +36 -42
- data/lib/rex/socket/range_walker.rb +1 -1
- data/lib/rex/text.rb +18 -1
- data/lib/rex/ui/text/table.rb +1 -1
- metadata +5 -3
@@ -8,11 +8,10 @@ module Def
|
|
8
8
|
|
9
9
|
class Def_ws2_32
|
10
10
|
|
11
|
-
def self.
|
12
|
-
|
13
|
-
railgun.add_dll('ws2_32')
|
11
|
+
def self.create_dll(dll_path = 'ws2_32')
|
12
|
+
dll = DLL.new(dll_path, ApiConstants.manager)
|
14
13
|
|
15
|
-
|
14
|
+
dll.add_function('WSAAccept', 'DWORD',[
|
16
15
|
["DWORD","s","in"],
|
17
16
|
["PBLOB","addr","inout"],
|
18
17
|
["PDWORD","addrlen","inout"],
|
@@ -20,7 +19,7 @@ class Def_ws2_32
|
|
20
19
|
["PDWORD","dwCallbackData","in"],
|
21
20
|
])
|
22
21
|
|
23
|
-
|
22
|
+
dll.add_function('WSAAddressToStringA', 'DWORD',[
|
24
23
|
["PBLOB","lpsaAddress","in"],
|
25
24
|
["DWORD","dwAddressLength","in"],
|
26
25
|
["PBLOB","lpProtocolInfo","in"],
|
@@ -28,7 +27,7 @@ class Def_ws2_32
|
|
28
27
|
["PDWORD","lpdwAddressStringLength","inout"],
|
29
28
|
])
|
30
29
|
|
31
|
-
|
30
|
+
dll.add_function('WSAAddressToStringW', 'DWORD',[
|
32
31
|
["PBLOB","lpsaAddress","in"],
|
33
32
|
["DWORD","dwAddressLength","in"],
|
34
33
|
["PBLOB","lpProtocolInfo","in"],
|
@@ -36,7 +35,7 @@ class Def_ws2_32
|
|
36
35
|
["PDWORD","lpdwAddressStringLength","inout"],
|
37
36
|
])
|
38
37
|
|
39
|
-
|
38
|
+
dll.add_function('WSAAsyncGetHostByAddr', 'DWORD',[
|
40
39
|
["DWORD","hWnd","in"],
|
41
40
|
["DWORD","wMsg","in"],
|
42
41
|
["PCHAR","addr","in"],
|
@@ -46,7 +45,7 @@ class Def_ws2_32
|
|
46
45
|
["DWORD","buflen","in"],
|
47
46
|
])
|
48
47
|
|
49
|
-
|
48
|
+
dll.add_function('WSAAsyncGetHostByName', 'DWORD',[
|
50
49
|
["DWORD","hWnd","in"],
|
51
50
|
["DWORD","wMsg","in"],
|
52
51
|
["PCHAR","name","in"],
|
@@ -54,7 +53,7 @@ class Def_ws2_32
|
|
54
53
|
["DWORD","buflen","in"],
|
55
54
|
])
|
56
55
|
|
57
|
-
|
56
|
+
dll.add_function('WSAAsyncGetProtoByName', 'DWORD',[
|
58
57
|
["DWORD","hWnd","in"],
|
59
58
|
["DWORD","wMsg","in"],
|
60
59
|
["PCHAR","name","in"],
|
@@ -62,7 +61,7 @@ class Def_ws2_32
|
|
62
61
|
["DWORD","buflen","in"],
|
63
62
|
])
|
64
63
|
|
65
|
-
|
64
|
+
dll.add_function('WSAAsyncGetProtoByNumber', 'DWORD',[
|
66
65
|
["DWORD","hWnd","in"],
|
67
66
|
["DWORD","wMsg","in"],
|
68
67
|
["DWORD","number","in"],
|
@@ -70,7 +69,7 @@ class Def_ws2_32
|
|
70
69
|
["DWORD","buflen","in"],
|
71
70
|
])
|
72
71
|
|
73
|
-
|
72
|
+
dll.add_function('WSAAsyncGetServByName', 'DWORD',[
|
74
73
|
["DWORD","hWnd","in"],
|
75
74
|
["DWORD","wMsg","in"],
|
76
75
|
["PCHAR","name","in"],
|
@@ -79,7 +78,7 @@ class Def_ws2_32
|
|
79
78
|
["DWORD","buflen","in"],
|
80
79
|
])
|
81
80
|
|
82
|
-
|
81
|
+
dll.add_function('WSAAsyncGetServByPort', 'DWORD',[
|
83
82
|
["DWORD","hWnd","in"],
|
84
83
|
["DWORD","wMsg","in"],
|
85
84
|
["DWORD","port","in"],
|
@@ -88,28 +87,28 @@ class Def_ws2_32
|
|
88
87
|
["DWORD","buflen","in"],
|
89
88
|
])
|
90
89
|
|
91
|
-
|
90
|
+
dll.add_function('WSAAsyncSelect', 'DWORD',[
|
92
91
|
["DWORD","s","in"],
|
93
92
|
["DWORD","hWnd","in"],
|
94
93
|
["DWORD","wMsg","in"],
|
95
94
|
["DWORD","lEvent","in"],
|
96
95
|
])
|
97
96
|
|
98
|
-
|
97
|
+
dll.add_function('WSACancelAsyncRequest', 'DWORD',[
|
99
98
|
["DWORD","hAsyncTaskHandle","in"],
|
100
99
|
])
|
101
100
|
|
102
|
-
|
101
|
+
dll.add_function('WSACancelBlockingCall', 'DWORD',[
|
103
102
|
])
|
104
103
|
|
105
|
-
|
104
|
+
dll.add_function('WSACleanup', 'DWORD',[
|
106
105
|
])
|
107
106
|
|
108
|
-
|
107
|
+
dll.add_function('WSACloseEvent', 'BOOL',[
|
109
108
|
["DWORD","hEvent","in"],
|
110
109
|
])
|
111
110
|
|
112
|
-
|
111
|
+
dll.add_function('WSAConnect', 'DWORD',[
|
113
112
|
["DWORD","s","in"],
|
114
113
|
["PBLOB","name","in"],
|
115
114
|
["DWORD","namelen","in"],
|
@@ -119,59 +118,59 @@ class Def_ws2_32
|
|
119
118
|
["PBLOB","lpGQOS","in"],
|
120
119
|
])
|
121
120
|
|
122
|
-
|
121
|
+
dll.add_function('WSACreateEvent', 'DWORD',[
|
123
122
|
])
|
124
123
|
|
125
|
-
|
124
|
+
dll.add_function('WSADuplicateSocketA', 'DWORD',[
|
126
125
|
["DWORD","s","in"],
|
127
126
|
["DWORD","dwProcessId","in"],
|
128
127
|
["PBLOB","lpProtocolInfo","inout"],
|
129
128
|
])
|
130
129
|
|
131
|
-
|
130
|
+
dll.add_function('WSADuplicateSocketW', 'DWORD',[
|
132
131
|
["DWORD","s","in"],
|
133
132
|
["DWORD","dwProcessId","in"],
|
134
133
|
["PBLOB","lpProtocolInfo","inout"],
|
135
134
|
])
|
136
135
|
|
137
|
-
|
136
|
+
dll.add_function('WSAEnumNameSpaceProvidersA', 'DWORD',[
|
138
137
|
["PDWORD","lpdwBufferLength","inout"],
|
139
138
|
["PBLOB","lpnspBuffer","inout"],
|
140
139
|
])
|
141
140
|
|
142
|
-
|
141
|
+
dll.add_function('WSAEnumNameSpaceProvidersW', 'DWORD',[
|
143
142
|
["PDWORD","lpdwBufferLength","inout"],
|
144
143
|
["PBLOB","lpnspBuffer","inout"],
|
145
144
|
])
|
146
145
|
|
147
|
-
|
146
|
+
dll.add_function('WSAEnumNetworkEvents', 'DWORD',[
|
148
147
|
["DWORD","s","in"],
|
149
148
|
["DWORD","hEventObject","in"],
|
150
149
|
["PBLOB","lpNetworkEvents","inout"],
|
151
150
|
])
|
152
151
|
|
153
|
-
|
152
|
+
dll.add_function('WSAEnumProtocolsA', 'DWORD',[
|
154
153
|
["PDWORD","lpiProtocols","in"],
|
155
154
|
["PBLOB","lpProtocolBuffer","inout"],
|
156
155
|
["PDWORD","lpdwBufferLength","inout"],
|
157
156
|
])
|
158
157
|
|
159
|
-
|
158
|
+
dll.add_function('WSAEnumProtocolsW', 'DWORD',[
|
160
159
|
["PDWORD","lpiProtocols","in"],
|
161
160
|
["PBLOB","lpProtocolBuffer","inout"],
|
162
161
|
["PDWORD","lpdwBufferLength","inout"],
|
163
162
|
])
|
164
163
|
|
165
|
-
|
164
|
+
dll.add_function('WSAEventSelect', 'DWORD',[
|
166
165
|
["DWORD","s","in"],
|
167
166
|
["DWORD","hEventObject","in"],
|
168
167
|
["DWORD","lNetworkEvents","in"],
|
169
168
|
])
|
170
169
|
|
171
|
-
|
170
|
+
dll.add_function('WSAGetLastError', 'DWORD',[
|
172
171
|
])
|
173
172
|
|
174
|
-
|
173
|
+
dll.add_function('WSAGetOverlappedResult', 'BOOL',[
|
175
174
|
["DWORD","s","in"],
|
176
175
|
["PBLOB","lpOverlapped","in"],
|
177
176
|
["PDWORD","lpcbTransfer","inout"],
|
@@ -179,59 +178,59 @@ class Def_ws2_32
|
|
179
178
|
["PDWORD","lpdwFlags","inout"],
|
180
179
|
])
|
181
180
|
|
182
|
-
|
181
|
+
dll.add_function('WSAGetQOSByName', 'BOOL',[
|
183
182
|
["DWORD","s","in"],
|
184
183
|
["PBLOB","lpQOSName","in"],
|
185
184
|
["PBLOB","lpQOS","inout"],
|
186
185
|
])
|
187
186
|
|
188
|
-
|
187
|
+
dll.add_function('WSAGetServiceClassInfoA', 'DWORD',[
|
189
188
|
["PBLOB","lpProviderId","in"],
|
190
189
|
["PBLOB","lpServiceClassId","in"],
|
191
190
|
["PDWORD","lpdwBufSize","inout"],
|
192
191
|
["PBLOB","lpServiceClassInfo","inout"],
|
193
192
|
])
|
194
193
|
|
195
|
-
|
194
|
+
dll.add_function('WSAGetServiceClassInfoW', 'DWORD',[
|
196
195
|
["PBLOB","lpProviderId","in"],
|
197
196
|
["PBLOB","lpServiceClassId","in"],
|
198
197
|
["PDWORD","lpdwBufSize","inout"],
|
199
198
|
["PBLOB","lpServiceClassInfo","inout"],
|
200
199
|
])
|
201
200
|
|
202
|
-
|
201
|
+
dll.add_function('WSAGetServiceClassNameByClassIdA', 'DWORD',[
|
203
202
|
["PBLOB","lpServiceClassId","in"],
|
204
203
|
["PCHAR","lpszServiceClassName","inout"],
|
205
204
|
["PDWORD","lpdwBufferLength","inout"],
|
206
205
|
])
|
207
206
|
|
208
|
-
|
207
|
+
dll.add_function('WSAGetServiceClassNameByClassIdW', 'DWORD',[
|
209
208
|
["PBLOB","lpServiceClassId","in"],
|
210
209
|
["PWCHAR","lpszServiceClassName","inout"],
|
211
210
|
["PDWORD","lpdwBufferLength","inout"],
|
212
211
|
])
|
213
212
|
|
214
|
-
|
213
|
+
dll.add_function('WSAHtonl', 'DWORD',[
|
215
214
|
["DWORD","s","in"],
|
216
215
|
["DWORD","hostlong","in"],
|
217
216
|
["PDWORD","lpnetlong","inout"],
|
218
217
|
])
|
219
218
|
|
220
|
-
|
219
|
+
dll.add_function('WSAHtons', 'DWORD',[
|
221
220
|
["DWORD","s","in"],
|
222
221
|
["WORD","hostshort","in"],
|
223
222
|
["PBLOB","lpnetshort","inout"],
|
224
223
|
])
|
225
224
|
|
226
|
-
|
225
|
+
dll.add_function('WSAInstallServiceClassA', 'DWORD',[
|
227
226
|
["PBLOB","lpServiceClassInfo","in"],
|
228
227
|
])
|
229
228
|
|
230
|
-
|
229
|
+
dll.add_function('WSAInstallServiceClassW', 'DWORD',[
|
231
230
|
["PBLOB","lpServiceClassInfo","in"],
|
232
231
|
])
|
233
232
|
|
234
|
-
|
233
|
+
dll.add_function('WSAIoctl', 'DWORD',[
|
235
234
|
["DWORD","s","in"],
|
236
235
|
["DWORD","dwIoControlCode","in"],
|
237
236
|
["PBLOB","lpvInBuffer","in"],
|
@@ -243,10 +242,10 @@ class Def_ws2_32
|
|
243
242
|
["PBLOB","lpCompletionRoutine","in"],
|
244
243
|
])
|
245
244
|
|
246
|
-
|
245
|
+
dll.add_function('WSAIsBlocking', 'BOOL',[
|
247
246
|
])
|
248
247
|
|
249
|
-
|
248
|
+
dll.add_function('WSAJoinLeaf', 'DWORD',[
|
250
249
|
["DWORD","s","in"],
|
251
250
|
["PBLOB","name","in"],
|
252
251
|
["DWORD","namelen","in"],
|
@@ -257,37 +256,37 @@ class Def_ws2_32
|
|
257
256
|
["DWORD","dwFlags","in"],
|
258
257
|
])
|
259
258
|
|
260
|
-
|
259
|
+
dll.add_function('WSALookupServiceBeginA', 'DWORD',[
|
261
260
|
["PBLOB","lpqsRestrictions","in"],
|
262
261
|
["DWORD","dwControlFlags","in"],
|
263
262
|
["PDWORD","lphLookup","inout"],
|
264
263
|
])
|
265
264
|
|
266
|
-
|
265
|
+
dll.add_function('WSALookupServiceBeginW', 'DWORD',[
|
267
266
|
["PBLOB","lpqsRestrictions","in"],
|
268
267
|
["DWORD","dwControlFlags","in"],
|
269
268
|
["PDWORD","lphLookup","inout"],
|
270
269
|
])
|
271
270
|
|
272
|
-
|
271
|
+
dll.add_function('WSALookupServiceEnd', 'DWORD',[
|
273
272
|
["DWORD","hLookup","in"],
|
274
273
|
])
|
275
274
|
|
276
|
-
|
275
|
+
dll.add_function('WSALookupServiceNextA', 'DWORD',[
|
277
276
|
["DWORD","hLookup","in"],
|
278
277
|
["DWORD","dwControlFlags","in"],
|
279
278
|
["PDWORD","lpdwBufferLength","inout"],
|
280
279
|
["PBLOB","lpqsResults","inout"],
|
281
280
|
])
|
282
281
|
|
283
|
-
|
282
|
+
dll.add_function('WSALookupServiceNextW', 'DWORD',[
|
284
283
|
["DWORD","hLookup","in"],
|
285
284
|
["DWORD","dwControlFlags","in"],
|
286
285
|
["PDWORD","lpdwBufferLength","inout"],
|
287
286
|
["PBLOB","lpqsResults","inout"],
|
288
287
|
])
|
289
288
|
|
290
|
-
|
289
|
+
dll.add_function('WSANSPIoctl', 'DWORD',[
|
291
290
|
["DWORD","hLookup","in"],
|
292
291
|
["DWORD","dwControlCode","in"],
|
293
292
|
["PBLOB","lpvInBuffer","in"],
|
@@ -298,25 +297,25 @@ class Def_ws2_32
|
|
298
297
|
["PBLOB","lpCompletion","in"],
|
299
298
|
])
|
300
299
|
|
301
|
-
|
300
|
+
dll.add_function('WSANtohl', 'DWORD',[
|
302
301
|
["DWORD","s","in"],
|
303
302
|
["DWORD","netlong","in"],
|
304
303
|
["PDWORD","lphostlong","inout"],
|
305
304
|
])
|
306
305
|
|
307
|
-
|
306
|
+
dll.add_function('WSANtohs', 'DWORD',[
|
308
307
|
["DWORD","s","in"],
|
309
308
|
["WORD","netshort","in"],
|
310
309
|
["PBLOB","lphostshort","inout"],
|
311
310
|
])
|
312
311
|
|
313
|
-
|
312
|
+
dll.add_function('WSAProviderConfigChange', 'DWORD',[
|
314
313
|
["PDWORD","lpNotificationHandle","inout"],
|
315
314
|
["PBLOB","lpOverlapped","in"],
|
316
315
|
["PBLOB","lpCompletionRoutine","in"],
|
317
316
|
])
|
318
317
|
|
319
|
-
|
318
|
+
dll.add_function('WSARecv', 'DWORD',[
|
320
319
|
["DWORD","s","in"],
|
321
320
|
["PBLOB","lpBuffers","inout"],
|
322
321
|
["DWORD","dwBufferCount","in"],
|
@@ -326,12 +325,12 @@ class Def_ws2_32
|
|
326
325
|
["PBLOB","lpCompletionRoutine","in"],
|
327
326
|
])
|
328
327
|
|
329
|
-
|
328
|
+
dll.add_function('WSARecvDisconnect', 'DWORD',[
|
330
329
|
["DWORD","s","in"],
|
331
330
|
["PBLOB","lpInboundDisconnectData","inout"],
|
332
331
|
])
|
333
332
|
|
334
|
-
|
333
|
+
dll.add_function('WSARecvFrom', 'DWORD',[
|
335
334
|
["DWORD","s","in"],
|
336
335
|
["PBLOB","lpBuffers","inout"],
|
337
336
|
["DWORD","dwBufferCount","in"],
|
@@ -343,15 +342,15 @@ class Def_ws2_32
|
|
343
342
|
["PBLOB","lpCompletionRoutine","in"],
|
344
343
|
])
|
345
344
|
|
346
|
-
|
345
|
+
dll.add_function('WSARemoveServiceClass', 'DWORD',[
|
347
346
|
["PBLOB","lpServiceClassId","in"],
|
348
347
|
])
|
349
348
|
|
350
|
-
|
349
|
+
dll.add_function('WSAResetEvent', 'BOOL',[
|
351
350
|
["DWORD","hEvent","in"],
|
352
351
|
])
|
353
352
|
|
354
|
-
|
353
|
+
dll.add_function('WSASend', 'DWORD',[
|
355
354
|
["DWORD","s","in"],
|
356
355
|
["PBLOB","lpBuffers","in"],
|
357
356
|
["DWORD","dwBufferCount","in"],
|
@@ -361,12 +360,12 @@ class Def_ws2_32
|
|
361
360
|
["PBLOB","lpCompletionRoutine","in"],
|
362
361
|
])
|
363
362
|
|
364
|
-
|
363
|
+
dll.add_function('WSASendDisconnect', 'DWORD',[
|
365
364
|
["DWORD","s","in"],
|
366
365
|
["PBLOB","lpOutboundDisconnectData","in"],
|
367
366
|
])
|
368
367
|
|
369
|
-
|
368
|
+
dll.add_function('WSASendTo', 'DWORD',[
|
370
369
|
["DWORD","s","in"],
|
371
370
|
["PBLOB","lpBuffers","in"],
|
372
371
|
["DWORD","dwBufferCount","in"],
|
@@ -378,27 +377,27 @@ class Def_ws2_32
|
|
378
377
|
["PBLOB","lpCompletionRoutine","in"],
|
379
378
|
])
|
380
379
|
|
381
|
-
|
380
|
+
dll.add_function('WSASetEvent', 'BOOL',[
|
382
381
|
["DWORD","hEvent","in"],
|
383
382
|
])
|
384
383
|
|
385
|
-
|
384
|
+
dll.add_function('WSASetLastError', 'VOID',[
|
386
385
|
["DWORD","iError","in"],
|
387
386
|
])
|
388
387
|
|
389
|
-
|
388
|
+
dll.add_function('WSASetServiceA', 'DWORD',[
|
390
389
|
["PBLOB","lpqsRegInfo","in"],
|
391
390
|
["PBLOB","essoperation","in"],
|
392
391
|
["DWORD","dwControlFlags","in"],
|
393
392
|
])
|
394
393
|
|
395
|
-
|
394
|
+
dll.add_function('WSASetServiceW', 'DWORD',[
|
396
395
|
["PBLOB","lpqsRegInfo","in"],
|
397
396
|
["PBLOB","essoperation","in"],
|
398
397
|
["DWORD","dwControlFlags","in"],
|
399
398
|
])
|
400
399
|
|
401
|
-
|
400
|
+
dll.add_function('WSASocketA', 'DWORD',[
|
402
401
|
["DWORD","af","in"],
|
403
402
|
["DWORD","type","in"],
|
404
403
|
["DWORD","protocol","in"],
|
@@ -407,7 +406,7 @@ class Def_ws2_32
|
|
407
406
|
["DWORD","dwFlags","in"],
|
408
407
|
])
|
409
408
|
|
410
|
-
|
409
|
+
dll.add_function('WSASocketW', 'DWORD',[
|
411
410
|
["DWORD","af","in"],
|
412
411
|
["DWORD","type","in"],
|
413
412
|
["DWORD","protocol","in"],
|
@@ -416,12 +415,12 @@ class Def_ws2_32
|
|
416
415
|
["DWORD","dwFlags","in"],
|
417
416
|
])
|
418
417
|
|
419
|
-
|
418
|
+
dll.add_function('WSAStartup', 'DWORD',[
|
420
419
|
["WORD","wVersionRequested","in"],
|
421
420
|
["PBLOB","lpWSAData","inout"],
|
422
421
|
])
|
423
422
|
|
424
|
-
|
423
|
+
dll.add_function('WSAStringToAddressA', 'DWORD',[
|
425
424
|
["PCHAR","AddressString","in"],
|
426
425
|
["DWORD","AddressFamily","in"],
|
427
426
|
["PBLOB","lpProtocolInfo","in"],
|
@@ -429,7 +428,7 @@ class Def_ws2_32
|
|
429
428
|
["PDWORD","lpAddressLength","inout"],
|
430
429
|
])
|
431
430
|
|
432
|
-
|
431
|
+
dll.add_function('WSAStringToAddressW', 'DWORD',[
|
433
432
|
["PWCHAR","AddressString","in"],
|
434
433
|
["DWORD","AddressFamily","in"],
|
435
434
|
["PBLOB","lpProtocolInfo","in"],
|
@@ -437,10 +436,10 @@ class Def_ws2_32
|
|
437
436
|
["PDWORD","lpAddressLength","inout"],
|
438
437
|
])
|
439
438
|
|
440
|
-
|
439
|
+
dll.add_function('WSAUnhookBlockingHook', 'DWORD',[
|
441
440
|
])
|
442
441
|
|
443
|
-
|
442
|
+
dll.add_function('WSAWaitForMultipleEvents', 'DWORD',[
|
444
443
|
["DWORD","cEvents","in"],
|
445
444
|
["PDWORD","lphEvents","in"],
|
446
445
|
["BOOL","fWaitAll","in"],
|
@@ -448,51 +447,51 @@ class Def_ws2_32
|
|
448
447
|
["BOOL","fAlertable","in"],
|
449
448
|
])
|
450
449
|
|
451
|
-
|
450
|
+
dll.add_function('__WSAFDIsSet', 'DWORD',[
|
452
451
|
["DWORD","param0","in"],
|
453
452
|
["PBLOB","param1","inout"],
|
454
453
|
])
|
455
454
|
|
456
|
-
|
455
|
+
dll.add_function('accept', 'DWORD',[
|
457
456
|
["DWORD","s","in"],
|
458
457
|
["PBLOB","addr","inout"],
|
459
458
|
["PDWORD","addrlen","inout"],
|
460
459
|
])
|
461
460
|
|
462
|
-
|
461
|
+
dll.add_function('bind', 'DWORD',[
|
463
462
|
["DWORD","s","in"],
|
464
463
|
["PBLOB","name","in"],
|
465
464
|
["DWORD","namelen","in"],
|
466
465
|
])
|
467
466
|
|
468
|
-
|
467
|
+
dll.add_function('closesocket', 'DWORD',[
|
469
468
|
["DWORD","s","in"],
|
470
469
|
])
|
471
470
|
|
472
|
-
|
471
|
+
dll.add_function('connect', 'DWORD',[
|
473
472
|
["DWORD","s","in"],
|
474
473
|
["PBLOB","name","in"],
|
475
474
|
["DWORD","namelen","in"],
|
476
475
|
])
|
477
476
|
|
478
|
-
|
477
|
+
dll.add_function('gethostname', 'DWORD',[
|
479
478
|
["PCHAR","name","inout"],
|
480
479
|
["DWORD","namelen","in"],
|
481
480
|
])
|
482
481
|
|
483
|
-
|
482
|
+
dll.add_function('getpeername', 'DWORD',[
|
484
483
|
["DWORD","s","in"],
|
485
484
|
["PBLOB","name","inout"],
|
486
485
|
["PDWORD","namelen","inout"],
|
487
486
|
])
|
488
487
|
|
489
|
-
|
488
|
+
dll.add_function('getsockname', 'DWORD',[
|
490
489
|
["DWORD","s","in"],
|
491
490
|
["PBLOB","name","inout"],
|
492
491
|
["PDWORD","namelen","inout"],
|
493
492
|
])
|
494
493
|
|
495
|
-
|
494
|
+
dll.add_function('getsockopt', 'DWORD',[
|
496
495
|
["DWORD","s","in"],
|
497
496
|
["DWORD","level","in"],
|
498
497
|
["DWORD","optname","in"],
|
@@ -500,45 +499,45 @@ class Def_ws2_32
|
|
500
499
|
["PDWORD","optlen","inout"],
|
501
500
|
])
|
502
501
|
|
503
|
-
|
502
|
+
dll.add_function('htonl', 'DWORD',[
|
504
503
|
["DWORD","hostlong","in"],
|
505
504
|
])
|
506
505
|
|
507
|
-
|
506
|
+
dll.add_function('htons', 'WORD',[
|
508
507
|
["WORD","hostshort","in"],
|
509
508
|
])
|
510
509
|
|
511
|
-
|
510
|
+
dll.add_function('inet_addr', 'DWORD',[
|
512
511
|
["PCHAR","cp","in"],
|
513
512
|
])
|
514
513
|
|
515
|
-
|
514
|
+
dll.add_function('ioctlsocket', 'DWORD',[
|
516
515
|
["DWORD","s","in"],
|
517
516
|
["DWORD","cmd","in"],
|
518
517
|
["PDWORD","argp","inout"],
|
519
518
|
])
|
520
519
|
|
521
|
-
|
520
|
+
dll.add_function('listen', 'DWORD',[
|
522
521
|
["DWORD","s","in"],
|
523
522
|
["DWORD","backlog","in"],
|
524
523
|
])
|
525
524
|
|
526
|
-
|
525
|
+
dll.add_function('ntohl', 'DWORD',[
|
527
526
|
["DWORD","netlong","in"],
|
528
527
|
])
|
529
528
|
|
530
|
-
|
529
|
+
dll.add_function('ntohs', 'WORD',[
|
531
530
|
["WORD","netshort","in"],
|
532
531
|
])
|
533
532
|
|
534
|
-
|
533
|
+
dll.add_function('recv', 'DWORD',[
|
535
534
|
["DWORD","s","in"],
|
536
535
|
["PCHAR","buf","inout"],
|
537
536
|
["DWORD","len","in"],
|
538
537
|
["DWORD","flags","in"],
|
539
538
|
])
|
540
539
|
|
541
|
-
|
540
|
+
dll.add_function('recvfrom', 'DWORD',[
|
542
541
|
["DWORD","s","in"],
|
543
542
|
["PCHAR","buf","inout"],
|
544
543
|
["DWORD","len","in"],
|
@@ -547,7 +546,7 @@ class Def_ws2_32
|
|
547
546
|
["PDWORD","fromlen","inout"],
|
548
547
|
])
|
549
548
|
|
550
|
-
|
549
|
+
dll.add_function('select', 'DWORD',[
|
551
550
|
["DWORD","nfds","in"],
|
552
551
|
["PBLOB","readfds","inout"],
|
553
552
|
["PBLOB","writefds","inout"],
|
@@ -555,14 +554,14 @@ class Def_ws2_32
|
|
555
554
|
["PDWORD","timeout","in"],
|
556
555
|
])
|
557
556
|
|
558
|
-
|
557
|
+
dll.add_function('send', 'DWORD',[
|
559
558
|
["DWORD","s","in"],
|
560
559
|
["PCHAR","buf","in"],
|
561
560
|
["DWORD","len","in"],
|
562
561
|
["DWORD","flags","in"],
|
563
562
|
])
|
564
563
|
|
565
|
-
|
564
|
+
dll.add_function('sendto', 'DWORD',[
|
566
565
|
["DWORD","s","in"],
|
567
566
|
["PCHAR","buf","in"],
|
568
567
|
["DWORD","len","in"],
|
@@ -571,7 +570,7 @@ class Def_ws2_32
|
|
571
570
|
["DWORD","tolen","in"],
|
572
571
|
])
|
573
572
|
|
574
|
-
|
573
|
+
dll.add_function('setsockopt', 'DWORD',[
|
575
574
|
["DWORD","s","in"],
|
576
575
|
["DWORD","level","in"],
|
577
576
|
["DWORD","optname","in"],
|
@@ -579,17 +578,18 @@ class Def_ws2_32
|
|
579
578
|
["DWORD","optlen","in"],
|
580
579
|
])
|
581
580
|
|
582
|
-
|
581
|
+
dll.add_function('shutdown', 'DWORD',[
|
583
582
|
["DWORD","s","in"],
|
584
583
|
["DWORD","how","in"],
|
585
584
|
])
|
586
585
|
|
587
|
-
|
586
|
+
dll.add_function('socket', 'DWORD',[
|
588
587
|
["DWORD","af","in"],
|
589
588
|
["DWORD","type","in"],
|
590
589
|
["DWORD","protocol","in"],
|
591
590
|
])
|
592
591
|
|
592
|
+
return dll
|
593
593
|
end
|
594
594
|
|
595
595
|
end
|