Skip to content

Instantly share code, notes, and snippets.

View WolfangAukang's full-sized avatar
🇵🇸
GitHub fariĝis banala interkona retejo

P. WolfangAukang

🇵🇸
GitHub fariĝis banala interkona retejo
View GitHub Profile
@WolfangAukang
WolfangAukang / netcat.py
Last active May 23, 2017 21:59
Black Hat Python book Netcat with Argparse
from argparse import ArgumentParser
import sys
import socket
import getopt
import threading
import subprocess
upload = False
def generate_argument_parser():
@WolfangAukang
WolfangAukang / keyindicator-nox
Created May 11, 2017 18:01
i3blocks extension that gets the indicated keyboard led status without using xset (useful for Sway, which uses Wayland)
#!/usr/bin/env python
from sys import argv
from evdev import InputDevice, ecodes
# usage: keystate-nonx [-h] [-i INPUT_DEVICE_CODE] [-oc OUTPUT_COLOR] [-ic INPUT_COLOR] [-b BLOCK_INSTANCE]
INSTANCE = "CAPS"
EVENT_NUMBER = "0"
COLOR_OFF = "#222222"
[Unit]
Description=Swaylock after suspension
After=suspend.target
[Service]
User=%I
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/local/bin/lock-screen.sh
@WolfangAukang
WolfangAukang / blum-algorithm.py
Created April 26, 2017 20:45
Code based on Manuel Blum's algorithm for memorizing passwords, using the Linotype standard.
#Blum's algorithm for memorizing passwords.
#Made by Pedro Rodríguez de Oliveira (WolfangAukang), 2015.
#Linotype ordered matrix, with the variant of the numeric digits
linotype = [['e','t','a','o','i','n'],['s','h','r','d','l','u'],['c','m','f','w','y','p'],['v','b','g','k','q','j'],['x','z','0','1','2','3'],['4','5','6','7','8','9']]
#String receptor
def blumcrypto(strToCode):
strToCode = [x.lower() for x in list(strToCode)]
print (blumcryptoEncr([x.lower() for x in list(strToCode)])) #We will work with lowercase letters
@WolfangAukang
WolfangAukang / smartgit.desktop
Last active January 4, 2017 20:08 — forked from alefteris/smartgit.desktop
Smartgit desktop file working on GNOME3
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
StartupNotify=true
Name=Smartgit
Exec=env /opt/smartgit/bin/smartgit.sh
Icon=/opt/smartgit/bin/smartgit-64.png