Skip to content

Commit 595cace

Browse files
committed
Fixup wldap32 mistakes
1 parent a980419 commit 595cace

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

lib/rex/post/meterpreter/extensions/stdapi/railgun/def/def_wldap32.rb

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def self.create_dll(dll_path = 'wldap32')
2323
['PCHAR', 'dn', 'in'],
2424
['PCHAR', 'cred', 'in'],
2525
['DWORD', 'method', 'in']
26-
], 'ldap_sslinitA', "cdecl")
26+
], 'ldap_bind_sA', "cdecl")
2727

2828
dll.add_function('ldap_search_sA', 'DWORD',[
2929
['DWORD', 'ld', 'in'],
@@ -33,70 +33,71 @@ def self.create_dll(dll_path = 'wldap32')
3333
['PCHAR', 'attrs[]', 'in'],
3434
['DWORD', 'attrsonly', 'in'],
3535
['PDWORD', 'res', 'out']
36-
], 'ldap_sslinitA', "cdecl")
36+
], 'ldap_search_sA', "cdecl")
3737

3838
dll.add_function('ldap_count_entries', 'DWORD',[
3939
['DWORD', 'ld', 'in'],
4040
['DWORD', 'res', 'in']
41-
])
42-
dll.add_function('ldap_first_entry', 'DWORD',[
41+
], "ldap_count_entries", "cdecl")
42+
43+
dll.add_function('ldap_first_entry', 'DWORD',[
4344
['DWORD', 'ld', 'in'],
4445
['DWORD', 'res', 'in']
45-
], 'ldap_sslinitA', "cdecl")
46+
], 'ldap_first_entry', "cdecl")
4647

4748
dll.add_function('ldap_next_entry', 'DWORD',[
4849
['DWORD', 'ld', 'in'],
4950
['DWORD', 'entry', 'in']
50-
], 'ldap_sslinitA', "cdecl")
51+
], 'ldap_next_entry', "cdecl")
5152

5253
dll.add_function('ldap_first_attributeA', 'DWORD',[
5354
['DWORD', 'ld', 'in'],
5455
['DWORD', 'entry', 'in'],
5556
['DWORD', 'ptr', 'in']
56-
], 'ldap_sslinitA', "cdecl")
57+
], 'ldap_first_attributeA', "cdecl")
5758

5859
dll.add_function('ldap_next_attributeA', 'DWORD',[
5960
['DWORD', 'ld', 'in'],
6061
['DWORD', 'entry', 'in'],
6162
['DWORD', 'ptr', 'inout']
62-
], 'ldap_sslinitA', "cdecl")
63+
], 'ldap_next_attributeA', "cdecl")
6364

6465
dll.add_function('ldap_count_values', 'DWORD',[
6566
['DWORD', 'vals', 'in'],
66-
], 'ldap_sslinitA', "cdecl")
67+
], 'ldap_count_values', "cdecl")
6768

6869
dll.add_function('ldap_get_values', 'DWORD',[
6970
['DWORD', 'ld', 'in'],
7071
['DWORD', 'entry', 'in'],
7172
['PCHAR', 'attr', 'in']
72-
], 'ldap_sslinitA', "cdecl")
73+
], 'ldap_get_values', "cdecl")
7374

7475
dll.add_function('ldap_value_free', 'DWORD',[
7576
['DWORD', 'vals', 'in'],
76-
], 'ldap_sslinitA', "cdecl")
77+
], 'ldap_value_free', "cdecl")
7778

7879
dll.add_function('ldap_memfree', 'VOID',[
7980
['DWORD', 'block', 'in'],
80-
], 'ldap_sslinitA', "cdecl")
81+
], 'ldap_memfree', "cdecl")
8182

8283
dll.add_function('ber_free', 'VOID',[
8384
['DWORD', 'pBerElement', 'in'],
8485
['DWORD', 'fbuf', 'in'],
85-
], 'ldap_sslinitA', "cdecl")
86+
], 'ber_free', "cdecl")
8687

87-
dll.add_function('LdapGetLastError', 'DWORD',[], 'ldap_sslinitA', "cdecl")
88+
dll.add_function('LdapGetLastError', 'DWORD',[], 'LdapGetLastError', "cdecl")
8889

8990
dll.add_function('ldap_err2string', 'DWORD',[
9091
['DWORD', 'err', 'in']
91-
], 'ldap_sslinitA', "cdecl")
92+
], 'ldap_err2string', "cdecl")
9293

9394
dll.add_function('ldap_msgfree', 'DWORD', [
9495
['DWORD', 'res', 'in']
95-
], 'ldap_sslinitA', "cdecl")
96+
], 'ldap_msgfree', "cdecl")
9697

9798
dll.add_function('ldap_unbind', 'DWORD', [
9899
['DWORD', 'ld', 'in']
99-
], 'ldap_sslinitA', "cdecl")
100+
], 'ldap_unbind', "cdecl")
100101
return dll
101102
end
102103

0 commit comments

Comments
 (0)