Skip to content

Instantly share code, notes, and snippets.

@libcrack
libcrack / keybase.md
Last active December 11, 2015 19:39
keybase proof

Keybase proof

I hereby claim:

  • I am libcrack on github.
  • I am borja (https://keybase.io/borja) on keybase.
  • I have a public key ASDuZCJx62qczLU6bHfDq3k52lkmoQwG0Gvw4fiSnv3lKwo

To claim this, I am signing this object:

@libcrack
libcrack / autocshscreen
Last active August 29, 2015 14:24
BSD flavoured (csh) auto-screen
##[--------------- start csh auto-screen snippet ----------------]
# BSD flavour by borja@libcrack.so - 2015
# Auto-screen invocation. see: http://taint.org/wk/RemoteLoginAutoScreen
# if we're coming from a remote SSH connection, in an interactive session
# then automatically put us into a screen(1) session. Only try once
# -- if $STARTED_SCREEN is set, don't try it again, to avoid looping
# if screen fails for some reason.
setenv STARTED_SCREEN
setenv DISPLAY
alias settitle printf '"\033]2;\!*\a\033]1;\!*\a\033]0;\!*\a"'
@libcrack
libcrack / .cshrc
Created June 30, 2015 23:26
FreeBSD 10 .cshrc additional stuff
# Home, End y Delete
bindkey "\e[1~" beginning-of-line # Home
bindkey "\e[7~" beginning-of-line # Home rxvt
bindkey "\e[2~" overwrite-mode # Ins
bindkey "\e[3~" delete-char # Delete
bindkey "\e[4~" end-of-line # End
bindkey "\e[8~" end-of-line # End rxvt
# reverse search Ctrl+r
bindkey "^R" i-search-back
@libcrack
libcrack / .screenrc
Last active February 6, 2016 09:52
screenrc@fbsd
# ===================================
# .screenrc@fbsd - borja@libcrack.so
# ===================================
# see http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html
# support color X terminals
termcap xterm 'XT:AF=\E[3%dm:AB=\E[4%dm:AX'
terminfo xterm 'XT:AF=\E[3%p1%dm:AB=\E[4%p1%dm:AX'
termcapinfo xterm 'XT:AF=\E[3%p1%dm:AB=\E[4%p1%dm:AX:hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007'
termcap xtermc 'XT:AF=\E[3%dm:AB=\E[4%dm:AX'
terminfo xtermc 'XT:AF=\E[3%p1%dm:AB=\E[4%p1%dm:AX'
@libcrack
libcrack / burp.sh
Created July 9, 2015 08:23
Burp suite starter
#!/bin/bash
# devnull@libcrack.so
# vie nov 8 08:45:35 CET 2013
# mar ene 21 23:14:46 CET 2014
java="$(which java)"
version="$($java -version 2>&1 | head -1 | cut -f2 -d\")"
myself="$(realpath ${0#-*})"
workdir="$(dirname $myself)"
@libcrack
libcrack / 0_reuse_code.js
Created October 17, 2015 10:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@libcrack
libcrack / killgdb.c
Created December 11, 2015 22:33 — forked from crowell/killgdb.c
#include <elf.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
// killgdb.c - prevent an elf from being loaded by gdb.
// Jeffrey Crowell <crowell [at] bu [dot] edu>
//
// $ objcopy --only-keep-debug program program.debug
@libcrack
libcrack / cve_2016_0728.c
Last active January 20, 2016 14:34 — forked from PerceptionPointTeam/cve_2016_0728.c
cve_2016_0728 exploit
/* $ gcc cve_2016_0728.c -o cve_2016_0728 -lkeyutils -Wall */
/* $ ./cve_2016_072 PP_KEY */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <keyutils.h>
#include <unistd.h>
#include <time.h>
## Disable NetworkManager
1. Remove the files `/usr/share/dbus-1/system-services/org.freedesktop.NetworkManager.service`
2. Comment the below line from `/usr/lib/systemd/system/NetworkManager.service`
```bash
Alias=dbus-org.freedesktop.NetworkManager.service
```
3.Remove the symlink `/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service`
#!/usr/bin/env perl
use strict;
use warnings;
while (<STDIN>){
$_ =~ s/([;<>\*\|`&\$!#\(\)\[\]\{\}:'"])/\\$1/g;
print $_;
}