<s> """<STR_LIT>""" <EOL> import re <EOL> import _winreg <EOL> def binipdisplay ( s ) : <EOL> "<STR_LIT>" <EOL> if len ( s ) % <NUM_LIT:4> != <NUM_LIT:0> : <EOL> raise EnvironmentError <EOL> ol = [ ] <EOL> for i in range ( len ( s ) / <NUM_LIT:4> ) : <EOL> s1 = s [ : <NUM_LIT:4> ] <EOL> s = s [ <NUM_LIT:4> : ] <EOL> ip = [ ] <EOL> for j in s1 : <EOL> ip . append ( str ( ord ( j ) ) ) <EOL> ol . append ( '<STR_LIT:.>' . join ( ip ) ) <EOL> return ol <EOL> def stringdisplay ( s ) : <EOL> '''<STR_LIT>''' <EOL> import re <EOL> return [ str ( x ) for x in re . split ( "<STR_LIT>" , s ) ] <EOL> def RegistryResolve ( ) : <EOL> nameservers = [ ] <EOL> x = _winreg . ConnectRegistry ( None , _winreg . HKEY_LOCAL_MACHINE ) <EOL> try : <EOL> y = _winreg . OpenKey ( x , <EOL> r"<STR_LIT>" ) <EOL> except EnvironmentError : <EOL> try : <EOL> y = _winreg . OpenKey ( x , <EOL> r"<STR_LIT>" ) <EOL> nameserver , dummytype = _winreg . QueryValueEx ( y , '<STR_LIT>' ) <EOL> if nameserver and not ( nameserver in nameservers ) : <EOL> nameservers . extend ( stringdisplay ( nameserver ) ) <EOL> except EnvironmentError : <EOL> pass <EOL> return nameservers <EOL> try : <EOL> nameserver = _winreg . QueryValueEx ( y , "<STR_LIT>" ) [ <NUM_LIT:0> ] . split ( ) <EOL> except : <EOL> nameserver = _winreg . QueryValueEx ( y , "<STR_LIT>" ) [ <NUM_LIT:0> ] . split ( ) <EOL> if nameserver : <EOL> nameservers = nameserver <EOL> nameserver = _winreg . QueryValueEx ( y , "<STR_LIT>" ) [ <NUM_LIT:0> ] <EOL> _winreg . CloseKey ( y ) <EOL> try : <EOL> y = _winreg . OpenKey ( x , <EOL> r"<STR_LIT>" ) <EOL> for i in range ( <NUM_LIT:1000> ) : <EOL> try : <EOL> n = _winreg . EnumKey ( y , i ) <EOL> z = _winreg . OpenKey ( y , n ) <EOL> dnscount , dnscounttype = _winreg . QueryValueEx ( z , <EOL> '<STR_LIT>' ) <EOL> dnsvalues , dnsvaluestype = _winreg . QueryValueEx ( z , <EOL> '<STR_LIT>' ) <EOL> nameservers . extend ( binipdisplay ( dnsvalues ) ) <EOL> _winreg . CloseKey ( z ) <EOL> except EnvironmentError : <EOL> break <EOL> _winreg . CloseKey ( y ) <EOL> except EnvironmentError : <EOL> pass <EOL> try : <EOL> y = _winreg . OpenKey ( x , <EOL> r"<STR_LIT>" ) <EOL> for i in range ( <NUM_LIT:1000> ) : <EOL> try : <EOL> n = _winreg . EnumKey ( y , i ) <EOL> z = _winreg . OpenKey ( y , n ) <EOL> try : <EOL> nameserver , dummytype = _winreg . QueryValueEx ( z , '<STR_LIT>' ) <EOL> if nameserver and not ( nameserver in nameservers ) : <EOL> nameservers . extend ( stringdisplay ( nameserver ) ) <EOL> except EnvironmentError : <EOL> pass <EOL> _winreg . CloseKey ( z ) <EOL> except EnvironmentError : <EOL> break <EOL> _winreg . CloseKey ( y ) <EOL> except EnvironmentError : <EOL> pass <EOL> _winreg . CloseKey ( x ) <EOL> return nameservers <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> print "<STR_LIT>" , RegistryResolve ( ) </s>
