Announcement

Collapse
No announcement yet.

Has Registry Key

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Has Registry Key

    Please use the script to check whether your target machine has the register key or not

    Code:
    import _winreg
    
    def main():    
        key = r'HKEY_LOCAL_MACHINE\SOFTWARE\COMODO'
        hekey = key.split('\\')[0]
        hkey = getattr(_winreg, hekey)
        skey = '\\'.join(key.split('\\')[1:])
        try:
            pkey = _winreg.OpenKey(hkey, skey)
            print 'Success: '+hekey+'\\'+skey+' is available'
        except WindowsError as e:
    ##        print e
            print 'Check whether '+hekey+'\\'+skey+' is valid or accessible!'
            
    if __name__ == '__main__':
        main()
    Sample Output:
    Click image for larger version

Name:	Has Register Key.PNG
Views:	1
Size:	3.5 KB
ID:	4779

    Last edited by Purushothaman; 11-04-2016, 01:44 PM.
Working...
X