Skip to content

Instantly share code, notes, and snippets.

View sgnls's full-sized avatar

sgnls

View GitHub Profile
@sgnls
sgnls / strong-passwords.php
Created February 14, 2017 13:18 — forked from tylerhall/strong-passwords.php
A user friendly, strong password generator PHP function.
<?PHP
// Generates a strong password of N length containing at least one lower case letter,
// one uppercase letter, one digit, and one special character. The remaining characters
// in the password are chosen at random from those four sets.
//
// The available characters in each set are user friendly - there are no ambiguous
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option,
// makes it much easier for users to manually type or speak their passwords.
//
// Note: the $add_dashes option will increase the length of the password by
// Uncompressed version of
// https://gist.github.com/munificent/b1bcd969063da3e6c298be070a22b604
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#include <stdbool.h> // 2008-2019
const int HEIGHT = 40;
const int WIDTH = 80;
@sgnls
sgnls / generate.c
Created March 12, 2019 14:36 — forked from munificent/generate.c
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@sgnls
sgnls / cntlm_npm.md
Created May 7, 2019 08:29 — forked from triskell/cntlm_npm.md
[Windows 7] CNTLM and NPM behind NTLM proxy

CNTLM and NPM behind NTLM proxy on Windows 7

CNTLM

  • Install CNTLM in a folder where you have full rights to run it as administrator.

  • Open cntlm.ini and fill it :

Username    YOUR_USERNAME
Domain YOUR_DOMAIN
@sgnls
sgnls / wireshark-dark.py
Created January 3, 2020 11:01 — forked from hexdefined/wireshark-dark.py
Invert the luminosity of Wireshark packets (for dark themes)
#!/usr/bin/env python3
import fileinput
import re
from colorsys import *
def rgb_to_hsl(r, g, b):
return hsv_to_hsl(*rgb_to_hsv(r, g, b))
def hsl_to_rgb(h, s, l):
return hsv_to_rgb(*hsl_to_hsv(h, s, l))
@sgnls
sgnls / airwave64.sh
Created May 24, 2020 19:04 — forked from rodlie/airwave64.sh
Build and install Airwave64 on Ubuntu Bionic (https://youtu.be/p93Fj3I3t9I)
#!/bin/sh
# Build and install Airwave64
# https://github.com/rodlie - <ole.andre.rodlie@gmail.com>
#
CWD=`pwd`
AIRWAVE_GIT="https://github.com/phantom-code/airwave"
AIRWAVE_COMMIT="8cd3507a46c2f7809a2ef8481cbded7dcbbae8ff"
VST_V="369_01_03_2018_build_132"
@sgnls
sgnls / 98-steelseries.rules
Created July 13, 2020 20:50 — forked from ToadKing/98-steelseries.rules
steelseries udev rules+script
ACTION=="add", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1038" RUN+="/etc/udev/rules.d/steelseries-perms.py '%E{DEVNAME}'"
<div id="wheel" ref="wheelContainer" :style="styles.wheel">
<img :style="styles.ticker"
ref="ticker"
:src="settings.ticker.url"/>
<div id="inner-wheel">
<img v-if="settings.centerImage.enabled"
:src="settings.centerImage.url"
:style="styles.centerImage" />
<svg viewBox="-1 -1 2 2"
xmlns="http://www.w3.org/2000/svg"
@sgnls
sgnls / trash.sh
Created August 13, 2020 17:33 — forked from geek-at/trash.sh
The script used to trash a banking phishing site
#!/bin/bash
while :; do
verf=$(cat /dev/urandom | tr -dc '0-9' | fold -w 8 | head -n 1)
pin=$(cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1)
ip=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))")
{
"formbook": [
"http://www.evana-rohanihijab.com/iic6/",
"http://www.alsagranit.info/rhk/",
"http://www.deejayatl.com/khm/",
"http://www.afrogurls.com/wzpq/",
"http://www.themagiczones.com/llp/",
"http://www.maggiesdelibellyllc.com/th7/",
"http://www.mompndo.com/h2h/",
"http://www.transparentpetcrate.com/lnb/",