Skip to content

Instantly share code, notes, and snippets.

View havocesp's full-sized avatar

Daniel Umpierrez havocesp

  • Spain
View GitHub Profile
@havocesp
havocesp / sh
Last active August 26, 2018 22:41
Download file from url if exists, otherwise return non-zero value to system.
function ftp_get(){
ftp -V "$1"
}
@havocesp
havocesp / args.py
Created December 10, 2018 18:54
Argparser
import sys
import argparse
import logging
import inspect
__all__ = ['ArgumentHandler','LOG_LEVEL','subcmd','reset_registered_subcommands']
LOG_LEVEL='log_level'
LOG_LEVEL_STR_LOOKUP = { logging.DEBUG:'DEBUG', logging.INFO:'INFO',
@havocesp
havocesp / tput-color.sh
Created December 11, 2018 20:37
Shell colors &styles with `tput`
# BASH Receipes
# ================================================================
# The "tput" magic
# ================================================================
tput bold # Bold effect
tput rev # Display inverse colors
tput sgr0 # Reset everything
tput setaf <code> # Set foreground color
tput setab <code> # Set background color
# ================================================================
@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
@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 / install_codiad.sh
Created December 29, 2018 00:27 — forked from rnauber/install_codiad.sh
this installs the browser-based editor Codiad
#installs the browser-based editor Codiad
DEST=~/codiad
ADDR=127.0.0.1:9876
pkg install php
if [ ! -e $DEST ]
then
git clone https://github.com/Codiad/Codiad $DEST

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 / micro-installer.sh
Last active January 11, 2019 23:17
Command line "micro" text editor installer.
#!/usr/bin/env bash
curl https://getmic.ro | bash
@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:
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)