Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F24497302
Terminator plugin
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Duranzed
Mon, Feb 23, 16:11
2026-02-23 16:11:56 (UTC+0)
Size
1007 B
Referenced Files
None
Subscribers
None
Terminator plugin
View Options
from terminatorlib.plugin import URLHandler
import subprocess
import os
AVAILABLE = ['ResolveHashURLHandler']
class ResolveHashURLHandler(URLHandler):
capabilities = ['url_handler']
handler_name = 'resolve_hash'
name = 'Nasqueron Resolve Hash'
# REGEX to detect hashes
match = r'\b[0-9a-f]{7,40}\b'
def callback(self, url):
hash_value = url.strip()
try:
#We define the path to resolve-hash module
script_path = os.path.expanduser ("~/bin/resolve-hash")
result = subprocess.check_output(
[script_path, hash_value],
stderr=subprocess.STDOUT,
text=True
)
#We clean the result
final_url = result.strip()
# Terminator only opens a navigator is the URL is correct
if final_url.startswith('http'):
return final_url
except Exception as e:
#if error we return none for terminator to ignore the clic
return None
return None
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3470345
Default Alt Text
Terminator plugin (1007 B)
Attached To
Mode
P384 Terminator plugin
Attached
Detach File
Event Timeline
Log In to Comment