Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Better random spam analysis

  • Loading branch information...
commit 45d233bbad63a386960d5eeeb606e64bdf6780bc 1 parent 9f7d4c3
@desbma desbma authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 ddc_process.py
View
7 ddc_process.py
@@ -1,9 +1,14 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
+import hashlib
+
VERSION = 1
def is_spam(domain):
- return len(domain.strip())%2 > 0
+ # returns dummy result, but consistent for a domain
+ hasher = hashlib.md5()
+ hasher.update(domain.encode("utf-8"))
+ return hasher.digest()[0] > 127
Please sign in to comment.
Something went wrong with that request. Please try again.