Exemple #1
0
    def test_NetrWkstaSetInfo(self):
        dce, rpc_transport = self.connect()
        request = wkst.NetrWkstaGetInfo()
        request['ServerName'] = '\x00' * 10
        request['Level'] = 502
        resp = dce.request(request)
        resp.dump()
        oldVal = resp['WkstaInfo']['WkstaInfo502']['wki502_dormant_file_limit']

        req = wkst.NetrWkstaSetInfo()
        req['ServerName'] = '\x00' * 10
        req['Level'] = 502
        req['WkstaInfo'] = resp['WkstaInfo']
        req['WkstaInfo']['WkstaInfo502']['wki502_dormant_file_limit'] = 500
        resp2 = dce.request(req)
        resp2.dump()

        resp = dce.request(request)
        self.assertEqual(
            500,
            resp['WkstaInfo']['WkstaInfo502']['wki502_dormant_file_limit'])

        req['WkstaInfo']['WkstaInfo502']['wki502_dormant_file_limit'] = oldVal
        resp2 = dce.request(req)
        resp2.dump()
Exemple #2
0
    def test_NetrWkstaGetInfo(self):
        dce, rpctransport = self.connect()
        request = wkst.NetrWkstaGetInfo()
        request['ServerName'] = '\x00' * 10
        request['Level'] = 100
        resp = dce.request(request)
        #resp.dump()

        request['Level'] = 101
        resp = dce.request(request)
        #resp.dump()

        request['Level'] = 102
        resp = dce.request(request)
        #resp.dump()

        request['Level'] = 502
        resp = dce.request(request)