Пример #1
0
    def test_hNetrSessionEnum(self):
        dce, rpctransport = self.connect()
        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 0)
        resp.dump()

        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 1)
        resp.dump()

        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 2)
        resp.dump()

        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 10)
        resp.dump()

        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 502)
        resp.dump()
Пример #2
0
    def test_hNetrSessionEnum(self):
        dce, rpctransport = self.connect()
        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 0)
        resp.dump()

        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 1)
        resp.dump()

        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 2)
        resp.dump()

        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 10)
        resp.dump()

        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 502)
        resp.dump()
Пример #3
0
    def test_hNetrSessionDel(self):
        dce, rpctransport = self.connect()
        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 502)
        resp.dump()

        try:
            resp = srvs.hNetrSessionDel(dce, resp['InfoStruct']['SessionInfo']['Level502']['Buffer'][0]['sesi502_cname'], resp['InfoStruct']['SessionInfo']['Level502']['Buffer'][0]['sesi502_username'] )
            resp.dump()
        except Exception, e:
            if e.get_error_code() != 0x908:
                raise
Пример #4
0
    def test_hNetrSessionDel(self):
        dce, rpctransport = self.connect()
        resp = srvs.hNetrSessionEnum(dce, NULL, NULL, 502)
        resp.dump()

        try:
            resp = srvs.hNetrSessionDel(
                dce, resp['InfoStruct']['SessionInfo']['Level502']['Buffer'][0]
                ['sesi502_cname'], resp['InfoStruct']['SessionInfo']
                ['Level502']['Buffer'][0]['sesi502_username'])
            resp.dump()
        except Exception, e:
            if e.get_error_code() != 0x908:
                raise