summaryrefslogtreecommitdiff
path: root/source4/scripting/swig/torture/spoolss.py
blob: 78d573a7cd0f64854ecff7c5d91a03eaeee1ec3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import dcerpc

def test_EnumPrinters(pipe):

    r = {}
    r['flags'] = 0x02
    r['server'] = None
    r['level'] = 1
    r['buffer'] = 392 * '\x00'
    r['buf_size'] = 392

    result = dcerpc.spoolss_EnumPrinters(pipe, r)

    print result

def runtests(binding, domain, username, password):
    
    print 'Testing SPOOLSS pipe'

    pipe = dcerpc.pipe_connect(binding,
            dcerpc.DCERPC_SPOOLSS_UUID, dcerpc.DCERPC_SPOOLSS_VERSION,
            domain, username, password)

    test_EnumPrinters(pipe)