Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F25477269
D3976.id10315.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
984 B
Referenced Files
None
Subscribers
None
D3976.id10315.diff
View Options
diff --git a/support/terminator/resolve_hash.py b/support/terminator/resolve_hash.py
new file mode 100644
--- /dev/null
+++ b/support/terminator/resolve_hash.py
@@ -0,0 +1,32 @@
+from terminatorlib.plugin import URLHandler
+import subprocess
+import os
+
+from resolvehash.resolvehash import parse_config, find_hash
+
+AVAILABLE = ["ResolveHashURLHandler"]
+
+
+class ResolveHashURLHandler(URLHandler):
+ capabilities = ["url_handler"]
+ handler_name = "resolve_hash"
+ name = "Nasqueron Resolve Hash"
+
+ # Long enough hexadecimal expressions are good hash candidates
+ match = r"\b[0-9a-f]{7,40}\b"
+
+ def __init__(self):
+ URLHandler.__init__(self)
+ self.config = parse_config()
+
+ def callback(self, needle_hash):
+ try:
+ final_url = find_hash(self.config, needle_hash)
+
+ if final_url.startswith("http"):
+ return final_url
+
+ except Exception:
+ pass
+
+ return None
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 06:53 (13 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3628955
Default Alt Text
D3976.id10315.diff (984 B)
Attached To
Mode
D3976: [WIP] Add plugin for terminator to resolve hashes
Attached
Detach File
Event Timeline
Log In to Comment