win32net.NetShareGetInfo

Here are the examples of the python api win32net.NetShareGetInfo taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: pysecdump
Source File: share.py
View license
    def get_info(self):
        if not self.info:
            try:
                shareinfo = win32net.NetShareGetInfo(wpc.conf.remote_server, self.get_name(), 502)
                self.description = shareinfo['reserved']
                self.passwd = shareinfo['passwd']
                self.current_uses = shareinfo['current_uses']
                self.max_uses = shareinfo['max_uses']

                if shareinfo['path']:
                #    self.path = File(shareinfo['path'])
                #else:
                    self.path = shareinfo['path']

                self.type = shareinfo['type']

                if shareinfo['security_descriptor']:
                    self.sd = sd('share', shareinfo['security_descriptor'])
                else:
                    self.sd = None

                self.perms = shareinfo['permissions']

                self.info = shareinfo
            except:
                pass
        return self.info