Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F24578703
D3976.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3976.diff
View Options
diff --git a/support/terminator/README.md b/support/terminator/README.md
new file mode 100644
--- /dev/null
+++ b/support/terminator/README.md
@@ -0,0 +1,11 @@
+resolve_hash.py is a Terminator plugin to call Resolve hash as URL handler for longer hashes.
+
+How to install :
+
+The plugin file must be placed in ~/.config/terminator/plugins/
+The plugin needs "resolve-hash" module to be installed on your system for it to work.
+
+--
+
+- Restart terminator.
+- Go to preferences --> plugins --> activate "ResolveHashURLHandler" in the menu.
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,39 @@
+# ---------------------------------------------------------------
+# Resolve hash
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Description: Terminator plugin to call Resolve hash as
+# URL handler for longer hashes
+# License: BSD-2-Clause
+# ---------------------------------------------------------------
+
+from terminatorlib.plugin import URLHandler
+
+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
Sun, Mar 1, 04:54 (22 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3483099
Default Alt Text
D3976.diff (1 KB)
Attached To
Mode
D3976: Add plugin for terminator to resolve hashes
Attached
Detach File
Event Timeline
Log In to Comment