Skip to content

Instantly share code, notes, and snippets.

View sudoaza's full-sized avatar

aza sudoaza

  • Buenos Aires, Argentina
View GitHub Profile
#define _GNU_SOURCE
#include <dlfcn.h>
#include <stdio.h>
#include <string.h>
#include <security/pam_modutil.h>
typedef int (*orig_func)(pam_handle_t * pamh, const char *name, const char *p, unsigned int ctrl);
int _unix_verify_password(pam_handle_t * pamh, const char *name, const char *p, unsigned int ctrl) {
@sudoaza
sudoaza / crack.py
Created September 16, 2017 03:26
crack the first 6 chars of a sha 1 adapted from here http://rextester.com/LQHCX48992
import hashlib #for converting passwords and guesses to hashes
import time #for timing the program and counting the passwords/ second
#variables
password = ''
passwordHash = ''
timeOld = time.time()
@sudoaza
sudoaza / brute_remote.py
Last active September 17, 2017 08:46
Bruteforce bit by bit
from pwn import *
from math import *
def match(str_1, str_2):
s1 = bits(str_1)
s2 = bits(str_2)
for i in range(len(s1)):
if s1[i] != s2[i]:
return i-1
return i-1
@sudoaza
sudoaza / pwn_input.py
Created September 17, 2017 09:01
Pwnable input spoiler
from pwn import *
pname = './input'
# stage 1
argu = [ 'a' for i in range(100)]
argu[0] = pname
argu[65] = '\x00'
argu[66] = '\x20\x0a\x0d'
argu[67] = '64999'
FROM ubuntu
# Install dependencies
RUN apt-get update && apt-get install -y \
autoconf \
automake \
autotools-dev \
build-essential \
cmake \
doxygen \
#!/usr/bin/env python3
import socket
import sys
import ssl
import argparse
from pwn import enhex
import time
def error(msg):
if not args.debug:
const {
BaseTransaction,
TransactionError,
utils
} = require('@liskhq/lisk-transactions');
/**
* Send tokens to multiple recipients.
*/
class MultiSendTransaction extends BaseTransaction {
@sudoaza
sudoaza / rscan.py
Last active November 25, 2019 13:50
#!/usr/bin/env python
import socket
import sys
sock = None
def connect(host, port=6379, timeout=3.0):
# Create a TCP/IP socket
sock = socket.socket(socket.AF_INET)
@sudoaza
sudoaza / align_and_fix.py
Created November 13, 2020 05:48
Align inputs and get mayority vote
# Import pairwise2 module
from Bio import pairwise2
# Import format_alignment method
from Bio.pairwise2 import format_alignment
import itertools
import glob
from scipy import stats as s
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © sudoaza
//@version=4
strategy("Double RSI")
// Fix the backtest graph
order_size = round(1 / close[1])
// Define RSI functions