1. psiphon
  2. Psiphon Circumvention System


Adam Pritchard  committed 1f04729

Made CountryCodeInfo an array, since multiple countries can match. Added info for language.

  • Participants
  • Parent commits 2b41c75
  • Branches default

Comments (0)

Files changed (2)

File EmailResponder/FeedbackDecryptor/datatransformer.py

View file
  • Ignore whitespace
         locale_match = [m for m in _locale_codes if m['lcid_number'] == locale_hex]
         os_info['LocaleInfo'] = locale_match[0] if locale_match else None
+        language_match = [m for m in _locale_codes if m['lcid_number'] == os_info['language']]
+        os_info['LanguageInfo'] = language_match[0] if language_match else None
+        # Multiple countries can have the same dialing code (like Canada and
+        # the US with 1), so CountryCodeInfo will be an array.
         country_match = [m for m in _country_dialing_codes if m['dialing_code'] == os_info['countryCode']]
         # Sometimes the countryCode as an additional digit. If we didn't get a
         # match, search again without the last digit.
         if not country_match:
             country_match = [m for m in _country_dialing_codes if m['dialing_code'] == os_info['countryCode'] / 10]
-        os_info['CountryCodeInfo'] = country_match[0] if country_match else None
+        os_info['CountryCodeInfo'] = country_match if country_match else None
 _transformations = {

File EmailResponder/FeedbackDecryptor/templates/template_windows_1.mako

View file
  • Ignore whitespace
   ${sys_info_row('User is', ', '.join([k for (k,v) in sys_info['UserInfo'].iteritems() if v]))}
   ${sys_info_row('AV', ', '.join([av['displayName'] for av in sys_info['SecurityInfo']['AntiVirusInfo'] if av[av['version']]['enabled']]))}
   ${sys_info_row('Uses proxy', 'yes' if [proxy for proxy in sys_info['NetworkInfo']['Original']['Proxy'] if proxy['flags'] != 'PROXY_TYPE_DIRECT'] else 'no')}
-  ${sys_info_row('~Country', sys_info['OSInfo']['CountryCodeInfo']['display'] if sys_info.get('OSInfo', {}).get('CountryCodeInfo', {}).get('display') else '')}
+  ${sys_info_row('~Country', ', '.join([c['display'] for c in sys_info['OSInfo']['CountryCodeInfo']]) if sys_info.get('OSInfo', {}).get('CountryCodeInfo') else '')}
   ${sys_info_row('~Locale', sys_info['OSInfo']['LocaleInfo']['display'] if sys_info.get('OSInfo', {}).get('LocaleInfo', {}).get('display') else '')}