Skip to content

Instantly share code, notes, and snippets.

@x0nu11byt3
x0nu11byt3 / keybase.md
Created January 19, 2024 00:04
Keybase proof

Keybase proof

I hereby claim:

  • I am x0nu11byt3 on github.
  • I am x0nu11byt3 (https://keybase.io/x0nu11byt3) on keybase.
  • I have a public key whose fingerprint is 3611 378E 9F55 2535 7C14 C28E 7FB2 0695 50E8 9AF0

To claim this, I am signing this object:

@x0nu11byt3
x0nu11byt3 / equivalent_modulo.c
Created December 22, 2023 10:28
In c, you could subtract 1 and do a bitwise-and. to make the calculation equivalent to the modulo.
#include <stdio.h>
#include <stdlib.h>
int main ( int argc, char** argvs ) {
int a = -127;
int b = 4;
int mod_ = a % b;
int mod_alt_a = a - b * ( a / b );
// mod_alt works as alternative to modulo
int mod_alt = a & ( b - 1 );
@x0nu11byt3
x0nu11byt3 / fsec_solve.py
Created July 7, 2023 06:48 — forked from LiveOverflow/fsec_solve.py
Fsec2017 z3 solution
from z3 import *
import struct
# calculate e,f,d for a given input password
def calc(m):
e = 0
f = 0
d = 0
for i in xrange(0, len(m)):
c = ord(m[i])
@x0nu11byt3
x0nu11byt3 / file_struct_employee.c
Created June 30, 2022 00:38
Read a simple struct employee write in c
#include <stdio.h>
#include <stdlib.h>
#define MAX_SIZE 50
typedef struct {
int key;
char name[MAX_SIZE];
char departament[MAX_SIZE];
char category[MAX_SIZE];
float antiquity;
@x0nu11byt3
x0nu11byt3 / memo_en.md
Created June 4, 2022 04:39
Advent Calendar CTF 2014 の write-up。ブログに移動しました -> https://st98.github.io/diary/posts/2014-12-26-adctf.html

Advent Calendar CTF 2014

Aditional note: This is a translated version of the original project gist.github.com/st98/memo.md

We participated as Bok Team omakase. The final score was 173 points and the team was ranked 24th (out of 505 teams). We solved the problems on days 1 to 14, 21 to 22 and 25.

1 warmup (misc)

'0x41444354465f57334c43304d335f37305f414443374632303134'.match(/[0-9a-f]{2}/g).map(function(c){return String.fromCharCode(parseInt(c, 16))}).join('');
@x0nu11byt3
x0nu11byt3 / sshclient.py
Created June 4, 2022 04:32
SSH Client with a simple connection and run an simple command. For to connect with a normal user without many privileges since to use the root user more processes. Iptables to open a port is enabled as follows: iptables -A INPUT -p tcp -m tcp --dport <port> -j ACCEPT
#!/usr/bin/env python3
import os
import sys
import paramiko
class SSHClient:
def __init__(self,hostname, port, username, password):
self._port = port
@x0nu11byt3
x0nu11byt3 / gaussjordan.py
Created June 4, 2022 04:30
A simple implementation of the algorithm pure MethodGaussJordan Is a linear algebra algorithm used to determine the solutions of a system of linear equations Previous requirements for handling complex arrays you need to install numpy
#!/usr/bin/env python3
import numpy as np
class error(Exception): pass
class GaussJordan():
def __init__(self,x,y):
self.m = x
self.n = y
self.matrix = [[ 0 for i in range(x)] for j in range(y)]
This is a collection of NFO templates from various PSP Crack / Warez Groups
--- 4Fun
▄▀ ▄▄█▓▄ ____________________ __________ ▄▓█▄▄ ▀▄
▐█ ███▀██▓▄ / | \_ _____/ | \ \@TiLK ▄▓██▀███ █▌
▓██▀ ░▐█▓▓ / | || __) | | / | \ ▓▓█▌░ ▀██▓
▀█▓ ░▐█▓▌ / ^ / \ | | / | \ ▐▓█▌░ ▓█▀
▀▀ ▄██▓ \____ |\___ / |______/\____|__ / ▓██▄ ▀▀
▄██▓▀ ▄▀ |__| \/ \/ ▀▄ ▀▓██▄
@x0nu11byt3
x0nu11byt3 / elf_format_cheatsheet.md
Created February 27, 2021 05:26
ELF Format Cheatsheet

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@x0nu11byt3
x0nu11byt3 / harekaze_mini_ctf_2020.md
Created February 27, 2021 05:24 — forked from farazsth98/harekaze_mini_ctf_2020.md
Harekaze mini CTF 2020

I played Harekaze Mini CTF 2020 for about 3 hours this weekend. The pwn challenges were nice (I especially enjoyed nm-game-extreme). Here are some short writeups.

shellcode

The program just tells you to provide shellcode that will execute execve("/bin/sh", NULL, NULL). It gives you the address of the "/bin/sh" string, so you just create shellcode to do the job and send it:

#!/usr/bin/env python3

from pwn import *