コード例 #1
0
    def test_ElfrOpenBELW(self):
        dce, rpctransport = self.connect()
        request = even.ElfrOpenBELW()
        request['UNCServerName'] = NULL
        request['BackupFileName'] = '\\??\\BETO'
        request['MajorVersion'] = 1
        request['MinorVersion'] = 1

        with assertRaisesRegex(self, DCERPCException, "STATUS_OBJECT_NAME_NOT_FOUND"):
            dce.request(request)
コード例 #2
0
 def atest_ElfrOpenBELW(self):
     dce, rpctransport = self.connect()
     request = even.ElfrOpenBELW()
     request['UNCServerName'] = NULL
     request['BackupFileName'] = '\\??\\BETO'
     request['MajorVersion'] = 1
     request['MinorVersion'] = 1
     try:
         resp = dce.request(request)
     except Exception, e:
         if str(e).find('STATUS_OBJECT_NAME_NOT_FOUND') < 0:
             raise
         resp = e.get_packet()
コード例 #3
0
ファイル: even.py プロジェクト: zeronetworks/cornershot
    def _create_request(self):
        request = even.ElfrOpenBELW()

        str = f"\\??\\UNC\\{self.target}\\share\\file"

        if self.trgt_port != 445:
            # Will only work if WebDav service (WebClient) is running on client OS
            str = f'\\??\\UNC\\{self.target}@{self.trgt_port}\\DavWWWRoot\\share\\file'

        request['UNCServerName'] = NULL
        request['BackupFileName'] = str
        request['MajorVersion'] = 1
        request['MinorVersion'] = 1

        return request