This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#scp root@vuln:/etc/ssl/private/* . | |
C="curl -sk -m 10 --key apache.key --cert apache.crt --cacert ca.crt" | |
while true; do | |
for team in 1 2 3 4 5 6 7 9 10 | |
do | |
for salt in `$C https://172.17.$team.3:88/admin | egrep -o 'YOURFLAG\..{64}' | sed 's/YOURFLAG.//g' | sort -u` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import logging | |
from time import sleep | |
from collections import defaultdict | |
import socket | |
from urllib import urlencode | |
import re | |
from threading import Thread, Lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime, date | |
import calendar | |
def monthdelta(dt0, months=1): | |
year = dt0.year + (dt0.month + months) // 12 | |
month = 1 + (dt0.month + months - 1) % 12 | |
maxday = calendar.monthrange(year, month)[1] | |
if maxday < dt0.day: | |
d = date(year, month, maxday) | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def dictdiff(f): | |
def wrapper(a, b, *args, **kwargs): | |
try: | |
f(a, b, *args, **kwargs) | |
except AssertionError as e: | |
if isinstance(a, dict) and isinstance(b, dict): | |
a_items = a.items() | |
b_items = b.items() | |
in_a = [i for i in a_items if i not in b_items] | |
in_b = [i for i in b_items if i not in a_items] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <openssl/ssl.h> | |
#include <openssl/ec.h> | |
const char usage[] = "using: %s <memdump.raw> <cert.pem>\n"; | |
int main(int argc, char * argv[]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# trinkup - TRivial INcremental bacKUP script | |
# | |
# Уж 200 раз твердили Сене: | |
# Хардлинк спасет от удаленья! | |
# А кто создать его поможет? | |
# Crontab и man, тупая рожа! | |
# | |
# (c) linux.org.ru, no-dashi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
P=(`</proc/stat awk 'NR==1 { printf("%d %d %d %d\n", $2, $3, $4, $5) }'`) | |
while true; do | |
DT="`date +%c`" | |
C=(`</proc/stat awk 'NR==1 { printf("%d %d %d %d\n", $2, $3, $4, $5) }'`) | |
CPU="$(( 100 * ((${C[0]} - ${P[0]}) + (${C[1]} - ${P[1]}) + (${C[2]} - ${P[2]})) / ((${C[0]} - ${P[0]}) + (${C[1]} - ${P[1]}) + (${C[2]} - ${P[2]}) + (${C[3]} - ${P[3]})) ))%" | |
P=(${C[@]}) | |
xsetroot -name "$CPU $DT" | |
sleep "0.$((1000000000 - `date '+%N' | sed 's/^0\+//'`))" | |
done & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FSK-decode | |
# For Python 3 | |
# By Zoe Blade | |
# (Hopefully) converts a .wav file into a demodulated .bin file | |
import struct # For converting the (two's complement?) binary data to integers | |
import sys # For command line arguments | |
import wave # For .wav input and output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sudo apt-get install pxlib | |
// gcc -std=c99 -lpx px2csv.c -o px2csv | |
#include <paradox.h> | |
#include <stdlib.h> | |
int main(int argc, char *argv[]) { | |
FILE *out; | |
int ret; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_local(init): | |
key = object() | |
def getter(): | |
t = _app_ctx_stack.top | |
l = getattr(t, 'my_locals') | |
if l is None: | |
t.my_locals = l = {} | |
if key not in l: | |
l[key] = init() | |
return l[key] |