elceef / dnstwist

Domain name permutation engine for detecting homograph phishing attacks, typo squatting, and brand impersonation
https://dnstwist.it
Apache License 2.0
4.85k stars 767 forks source link

str.isascii incompatible with python 3.6 [PR] #140

Closed nurettin closed 2 years ago

nurettin commented 2 years ago

139 adds compatibility with python 3.6

defines an isascii function that is very similar to what python uses internally. we need this backported because many security appliances still use Python 3.6 we can't monkey patch because str is not modifiable.

elceef commented 2 years ago

Thank you for reporting this issue. After reviewing your code, I found out it actually breaks the functionality due to a typo - underscore in def is_ascii(s):. I decided to resolve this with a completely different approach. Commits 6f59e755b8bbe03dffad4c73cb286da2631f6aab, 3f3d25d8410d0a2baeb47e1400b4942825ee1a25 and 7d65e088e01f690cbd80b56b42cf7db216a42b9a should make it compatible with Python 3.5 back again.

nurettin commented 2 years ago

Thank you very much.