summaryrefslogtreecommitdiff
path: root/source4/scripting/swig/torture/spoolss.py
blob: e29178a0b602e37b50bb0f2cd73c3bd0a29ef59a (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 dcerpc.unmarshall_spoolss_PrinterInfo1(result['buffer'])

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)