Skip to content

Instantly share code, notes, and snippets.

View havocesp's full-sized avatar

Daniel Umpierrez havocesp

  • Spain
View GitHub Profile
@havocesp
havocesp / mozlz4a.py
Created September 4, 2025 21:07 — forked from Tblue/mozlz4a.py
MozLz4a compression/decompression utility
#!/usr/bin/env python3
# vim: sw=4 ts=4 et tw=100 cc=+1
#
####################################################################################################
# DESCRIPTION #
####################################################################################################
#
# Decompressor/compressor for files in Mozilla's "mozLz4" format. Firefox uses this file format to
# compress e. g. bookmark backups (*.jsonlz4).
#
@havocesp
havocesp / autotypedict.py
Created March 15, 2023 00:38 — forked from bhughes339/autotypedict.py
Dictionary-like class that automatically tries to typecast each scalar value to a standard type
from collections import UserDict
from collections.abc import Iterable, Mapping
import json
class AutoTypeDict(UserDict):
"""Dictionary-like class that automatically tries to typecast each
scalar value to a standard type.
Values are only typecasted when the `AutoTypeDict` instance is
updated directly, so avoid using type-specific operations on mutable
@havocesp
havocesp / html_to_text.py
Created February 25, 2020 07:37 — forked from jspri/html_to_text.py
Converts html to plain text in python3. Only standard libraries used.
"""
HTML <-> text conversions.
http://stackoverflow.com/questions/328356/extracting-text-from-html-file-using-python
"""
from html.parser import HTMLParser
from html.entities import name2codepoint
import re
class _HTMLToText(HTMLParser):
def __init__(self):
@havocesp
havocesp / measure.py
Created April 3, 2019 13:48 — forked from sjtosco/measure.py
Linux Network Traffic Measure/Calculator Python Script
#!/usr/bin/env python
'''
_______ ______
|_ _\ \ / / ___|
| | \ \ / /\___ \
| | \ V / ___) |
|_| \_/ |____/
Teske Virtual System
import sys
import getpass
import stem.connection
import stem.socket
try:
control_socket = stem.socket.ControlPort(port = 9051)
except stem.SocketError as exc:
print 'Unable to connect to port 9051 (%s)' % exc
sys.exit(1)
@havocesp
havocesp / webview-app.py
Created January 25, 2019 12:33
Load web site inside a windows.
#!/usr/bin/python3
from gi.repository import Gtk
from gi.repository import WebKit
import sys
class MainWindow(Gtk.Window):
def __init__(self, *args):
Gtk.Window.__init__(self)
if len(sys.argv) == 5:
@havocesp
havocesp / micro-installer.sh
Last active January 9, 2025 10:13
Command line "micro" text editor installer.
#!/usr/bin/env bash
command curl -sL "https://getmic.ro" | bash

Keybase proof

I hereby claim:

  • I am havocesp on github.
  • I am havocesp (https://keybase.io/havocesp) on keybase.
  • I have a public key ASAJ9oIY58cKXDsPwo3wKaOQwsrTFSOK4P3KiV-GzVj8vwo

To claim this, I am signing this object:

@havocesp
havocesp / foo.text
Last active December 17, 2018 20:33
Interesting FUSE package listf
Interesting FUSE package list:
### Ubuntu Bionic:
afuse
ciopfs
copyfs
curlftpfs
enfuse
etcd-fs
@havocesp
havocesp / config
Created December 13, 2018 10:01
SSH Server over TOR
### $HOME/.ssh/config
host hidden
hostname <hidden_url.onion>
proxyCommand ncat --proxy 127.0.0.1:9050 --proxy-type socks5 %h %p