12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/def/windows/def_wlanapi.rb', line 12
def self.create_library(constant_manager, library_path = 'wlanapi')
dll = Library.new(library_path, constant_manager)
dll.add_function( 'WlanOpenHandle', 'DWORD',[
['DWORD', 'dwClientVersion', 'in'],
['LPVOID', 'pReserved', 'in'],
['PDWORD', 'pdwNegotiatedVersion', 'out'],
['PDWORD', 'phClientHandle', 'out']])
dll.add_function( 'WlanEnumInterfaces', 'DWORD',[
['DWORD', 'hClientHandle', 'in'],
['LPVOID', 'pReserved', 'in'],
['PDWORD', 'ppInterfaceList', 'out']])
dll.add_function( 'WlanGetProfileList', 'DWORD',[
['DWORD', 'hClientHandle', 'in'],
['PBLOB', 'pInterfaceGuid', 'in'],
['LPVOID', 'pReserved', 'in'],
['PDWORD', 'ppProfileList', 'out']])
dll.add_function( 'WlanGetProfile', 'DWORD',[
['DWORD', 'hClientHandle', 'in'],
['PBLOB', 'pInterfaceGuid', 'in'],
['PBLOB', 'strProfileName', 'in'],
['LPVOID', 'pReserved', 'in'],
['PDWORD', 'pstrProfileXML', 'out'],
['PDWORD', 'pdwFlags', 'inout'],
['PDWORD', 'pdwGrantedAccess', 'out']])
dll.add_function( 'WlanFreeMemory', 'DWORD',[
['LPVOID', 'pMemory', 'in']])
dll.add_function( 'WlanCloseHandle', 'DWORD',[
['DWORD', 'hClientHandle', 'in'],
['LPVOID', 'pReserved', 'in']])
dll.add_function( 'WlanQueryInterface', 'DWORD',[
['DWORD', 'hClientHandle', 'in'],
['PBLOB', 'pInterfaceGuid', 'in'],
['DWORD', 'OpCode', 'in'],
['LPVOID', 'pReserved', 'in'],
['PDWORD', 'pdwDataSize', 'out'],
['PDWORD', 'ppData', 'out'],
['PDWORD', 'pWlanOpcodeValueType', 'out']])
dll.add_function( 'WlanScan', 'DWORD',[
['DWORD', 'hClientHandle', 'in'],
['PBLOB', 'pInterfaceGuid', 'in'],
['PBLOB', 'pDot11Ssid', 'in'],
['PBLOB', 'pIeData', 'in'],
['LPVOID', 'pReserved', 'in']])
dll.add_function( 'WlanGetNetworkBssList', 'DWORD',[
['DWORD', 'hClientHandle', 'in'],
['PBLOB', 'pInterfaceGuid', 'in'],
['PBLOB', 'pDot11Ssid', 'in'],
['DWORD', 'dot11BssType', 'in'],
['BOOL', 'bSecurityEnabled', 'in'],
['LPVOID', 'pReserved', 'in'],
['PDWORD', 'ppWlanBssList', 'out']])
dll.add_function( 'WlanDisconnect', 'DWORD',[
['DWORD', 'hClientHandle', 'in'],
['PBLOB', 'pInterfaceGuid', 'in'],
['LPVOID', 'pReserved', 'in']])
return dll
end
|