Exemplo n.º 1
0
    def enum_disks(self, host):
        dce, rpctransport = self.connect(host, 'srvsvc')
        try:
            resp = srvs.hNetrServerDiskEnum(dce, 1)
        except Exception:
            resp = srvs.hNetrServerDiskEnum(dce, 0)

        print_succ("{}:{} Available disks:".format(host, settings.args.port))
        for disk in resp['DiskInfoStruct']['Buffer']:
            for dname in disk.fields.keys():
                if disk[dname] != '\x00':
                    print_att(disk[dname])
Exemplo n.º 2
0
    def enum_disks(self, host):
        dce, rpctransport = self.connect(host, 'srvsvc')
        try:
            resp = srvs.hNetrServerDiskEnum(dce, 1)
        except Exception:
            resp = srvs.hNetrServerDiskEnum(dce, 0)

        self.__logger.success("Enumerating disks")
        for disk in resp['DiskInfoStruct']['Buffer']:
            for dname in disk.fields.keys():
                if disk[dname] != '\x00':
                    self.__logger.results(disk[dname])
Exemplo n.º 3
0
    def enum_disks(self, host):
        dce, rpctransport = self.connect(host, 'srvsvc')
        try:
            resp = srvs.hNetrServerDiskEnum(dce, 1)
        except Exception:
            resp = srvs.hNetrServerDiskEnum(dce, 0)

        self.__logger.success("Enumerating disks")
        for disk in resp['DiskInfoStruct']['Buffer']:
            for dname in disk.fields.keys():
                if disk[dname] != '\x00':
                    self.__logger.results(disk[dname])
Exemplo n.º 4
0
    def enum_disks(self, host):
        dce, rpctransport = self.connect(host, 'srvsvc')
        try:
            resp = srvs.hNetrServerDiskEnum(dce, 1)
        except Exception:
            resp = srvs.hNetrServerDiskEnum(dce, 0)

        print_succ("{}:{} Available disks:".format(host, settings.args.port))
        for disk in resp['DiskInfoStruct']['Buffer']:
            for dname in disk.fields.keys():
                if disk[dname] != '\x00':
                    print_att(disk[dname])
Exemplo n.º 5
0
    def enum_disks(self):
        dce, rpctransport = self.connect('srvsvc')

        try:
            resp = srvs.hNetrServerDiskEnum(dce, 1)
        except Exception:
            pass

        try:
            resp = srvs.hNetrServerDiskEnum(dce, 0)
        except Exception:
            return

        self.logger.success("Enumerating disks")
        for disk in resp['DiskInfoStruct']['Buffer']:
            for dname in disk.fields.keys():
                if disk[dname] != '\x00':
                    self.logger.highlight(disk[dname])
Exemplo n.º 6
0
    def enum_disks(self):
        dce, rpctransport = self.connect('srvsvc')

        try:
            resp = srvs.hNetrServerDiskEnum(dce, 1)
        except Exception:
            pass

        try:
            resp = srvs.hNetrServerDiskEnum(dce, 0)
        except Exception:
            return

        self.logger.success("Enumerating disks")
        for disk in resp['DiskInfoStruct']['Buffer']:
            for dname in disk.fields.keys():
                if disk[dname] != '\x00':
                    self.logger.highlight(disk[dname])
Exemplo n.º 7
0
    def get_localdisks(self):

        resp = srvs.hNetrServerDiskEnum(self._rpc_connection, 0)

        results = list()
        for disk in resp['DiskInfoStruct']['Buffer']:
            if disk['Disk'] != '\x00':
                results.append(rpcobj.Disk(disk))

        return results
Exemplo n.º 8
0
    def get_localdisks(self):

        resp = srvs.hNetrServerDiskEnum(self._rpc_connection, 0)

        results = list()
        for disk in resp['DiskInfoStruct']['Buffer']:
            if disk['Disk'] != '\x00':
                results.append(rpcobj.Disk(disk))

        return results
Exemplo n.º 9
0
 def test_hNetrServerDiskEnum(self):
     dce, rpctransport = self.connect()
     resp = srvs.hNetrServerDiskEnum(dce, 0)
     resp.dump()
Exemplo n.º 10
0
 def test_hNetrServerDiskEnum(self):
     dce, rpctransport = self.connect()
     resp = srvs.hNetrServerDiskEnum(dce, 0)
     resp.dump()