Skip to content

Instantly share code, notes, and snippets.

@cboin
cboin / .bashrc
Created May 12, 2015 08:29
Bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# Masque de creation rwxr-xr-x
umask 022
# On fixe le PATH
export PATH=${HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:${PATH}
# On evite les betises
alias cp='cp -i'
@cboin
cboin / .vimrc
Created May 12, 2015 08:29
Vimrc
""""""""""""""""""""""""""""""""
" vimrc de Clément Boin - 2015 "
" "
""""""""""""""""""""""""""""""""
" On charge Pathogen
call pathogen#infect()
filetype plugin on
" On veut la numérotation des ligne
syntax enable
colorscheme molokai
@cboin
cboin / aes.rb
Created June 27, 2017 08:57
Encrypt/Decrypt File with AES in Ruby
require 'yaml'
require 'openssl'
def read_config
unless File.exist?(ENV["HOME"] + "/.mabs_api.yml")
key = {
:key => cipher.random_key,
:iv => cipher.random_iv
}
@cboin
cboin / apof.c
Created July 24, 2017 18:15
Get the absolute path of given files
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <unistd.h>
/*
* Darwin 16.6.0 Darwin Kernel Version 16.6.0
* $ make apof
* author: Clément Boin
*/

Keybase proof

I hereby claim:

  • I am cboin on github.
  • I am boinclement (https://keybase.io/boinclement) on keybase.
  • I have a public key ASClVdOfIyI45vPNV3svmDc0u_w-G1GOMoEPrWNSMZj6Mwo

To claim this, I am signing this object:

@cboin
cboin / crackme0x00.c
Last active May 5, 2018 09:55
crackme0x00
#include <stdio.h>
int main(void)
{
char input[32];
char *password = "aLfsdEH";
fgets(input, 32, stdin);
if (input[0] == 'a')
$ objdump -d crackmecpp | less
[..]
0804876c <main>:
 804876c:       55                      push   %ebp
 804876d:       89 e5                   mov    %esp,%ebp
 804876f:       83 e4 f0                and    $0xfffffff0,%esp
 [..]
 804879d:       8b 44 24 1c             mov    0x1c(%esp),%eax
 80487a1: 3d d2 04 00 00 cmp $0x4d2,%eax &lt;= cmp 1234, %eax
$ file crackmecpp
crackmecpp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.26, BuildID[sha1]=901287c7af167a087acdd19e0bc0087c2a993481, with debug_info, not stripped
$ ./crackmecpp
Passcode: 1234
YOURE IN!!% 
$ file CrackMe_ASM
CrackMe_ASM: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped