mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
r2300: Start writing a Python torture test suite based on the smbtorture rpc tests.
(This used to be commit 73e087f11e
)
This commit is contained in:
parent
a34ddd04ca
commit
984e71e5e5
@ -1,11 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import dcerpc
|
||||
|
||||
handle = dcerpc.pipe_connect("ncacn_np:win2k3dc",
|
||||
dcerpc.DCERPC_SAMR_UUID, dcerpc.DCERPC_SAMR_VERSION,
|
||||
"win2k3dom", "administrator", "penguin")
|
||||
|
||||
connect = {"system_name": "win2k3dc", "access_mask": 0x02000000}
|
||||
|
||||
print dcerpc.samr_Connect2(handle, connect)
|
52
source4/scripting/swig/torture/samr.py
Executable file
52
source4/scripting/swig/torture/samr.py
Executable file
@ -0,0 +1,52 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import dcerpc
|
||||
|
||||
def test_Connect(handle):
|
||||
|
||||
print 'testing samr_Connect'
|
||||
|
||||
r = {}
|
||||
r['system_name'] = '\0\0'
|
||||
r['access_mask'] = 0x02000000
|
||||
|
||||
result = dcerpc.samr_Connect(pipe, r)
|
||||
|
||||
dcerpc.samr_Close(pipe, result)
|
||||
|
||||
print 'testing samr_Connect2'
|
||||
|
||||
r = {}
|
||||
r['system_name'] = None
|
||||
r['access_mask'] = 0x02000000
|
||||
|
||||
result = dcerpc.samr_Connect2(pipe, r)
|
||||
dcerpc.samr_Close(pipe, result)
|
||||
|
||||
print 'testing samr_Connect3'
|
||||
|
||||
r = {}
|
||||
r['system_name'] = None
|
||||
r['unknown'] = 0
|
||||
r['access_mask'] = 0x02000000
|
||||
|
||||
result = dcerpc.samr_Connect3(pipe, r)
|
||||
dcerpc.samr_Close(pipe, result)
|
||||
|
||||
print 'testing samr_Connect4'
|
||||
|
||||
r = {}
|
||||
r['system_name'] = None
|
||||
r['unknown'] = 0
|
||||
r['access_mask'] = 0x02000000
|
||||
|
||||
result = dcerpc.samr_Connect4(pipe, r)
|
||||
dcerpc.samr_Close(pipe, result)
|
||||
|
||||
# Connect to server
|
||||
|
||||
pipe = dcerpc.pipe_connect('ncacn_np:win2k3dc',
|
||||
dcerpc.DCERPC_SAMR_UUID, dcerpc.DCERPC_SAMR_VERSION,
|
||||
'win2k3dom', 'administrator', 'penguin')
|
||||
|
||||
test_Connect(pipe)
|
Loading…
Reference in New Issue
Block a user