コード例 #1
0
ファイル: test_srvs.py プロジェクト: DarkGreising/impacket
    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
コード例 #2
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 as e:
            if e.get_error_code() != 0x908:
                raise