Skip to content

Instantly share code, notes, and snippets.

View jrelo's full-sized avatar

hed0rah jrelo

View GitHub Profile
@jrelo
jrelo / forwarder.py
Created June 23, 2024 18:52 — forked from LiveOverflow/forwarder.py
TCP Forwarder
import socket
import select
from logzero import logger
# python forwarder.py localhost:1337 ipinfo.io:80
# curl -v http://localhost.com:1337 -H "Host: ipinfo.io"
# video: https://www.youtube.com/watch?v=32KKwgF67Ho
class Forwarder:
@jrelo
jrelo / elf_format_cheatsheet.md
Created June 23, 2024 18:45 — forked from x0nu11byt3/elf_format_cheatsheet.md
ELF Format Cheatsheet

ELF Format Cheatsheet

Introduction

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

ELF

Compilation

@jrelo
jrelo / .vimrc
Created June 9, 2024 01:22 — forked from rocarvaj/.vimrc
Minimal .vimrc for C/C++ developers
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Gerhard Gappmeier
"
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" disable vi compatibility (emulation of old bugs)
@jrelo
jrelo / gist:3af2cd727c4118b3d9875deaf1978e13
Created May 9, 2019 20:16
vzprocess: ps with CTID filtration for OpenVZ
#!/usr/bin/perl
use strict;
use warnings;
unless (scalar @ARGV == 1) {
die "Parameter needed, please pass ctid as parameter";
}
my $ctid = $ARGV[0];
@jrelo
jrelo / aes.py
Created August 27, 2018 20:35 — forked from tryone144/aes.py
Implementation of AES as used by https://aesencryption.net
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# implementation of AES as used by https://aesencryption.net
#
# (c) 2018 Bernd Busse
from cryptography.hazmat.primitives.ciphers import Cipher
from cryptography.hazmat.primitives.ciphers.algorithms import AES
from cryptography.hazmat.primitives.ciphers.modes import CBC
@jrelo
jrelo / killcx
Created July 21, 2018 19:35 — forked from kisel/killcx
killcx
#!/usr/bin/perl
######################################################################
# killcx :
#
# Close a TCP connection under Linux.
#
# (c) Jerome Bruandet - <floodmon@spamcleaner.org>
#
# version 1.0.3 - 18-May-2011
#
@jrelo
jrelo / start_stop_memcached_script.sh
Created July 7, 2018 23:11 — forked from tinogomes/start_stop_memcached_script.sh
Script sample to start/stop for linux with nohup
#!/bin/bash
#
BASE=/tmp
PID=$BASE/app.pid
LOG=$BASE/app.log
ERROR=$BASE/app-error.log
PORT=11211
LISTEN_IP='0.0.0.0'
MEM_SIZE=4
@jrelo
jrelo / linux-explorer.sh
Created June 30, 2018 20:42 — forked from chrisfu/linux-explorer.sh
Linux Explorer system information script
#!/bin/bash
##############################################################################
#
#
# FILE : linux-explorer.sh
# Last Change Date : 04-07-2016
# Author(s) : Joe Santoro
# Date Started : 15th April, 2004
# Email : linuxexplo [ at ] unix-consultants.com
# Web : http://www.unix-consultants.com/examples/scripts/linux/linux-explorer

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@jrelo
jrelo / memory_layout.md
Created May 5, 2018 15:04 — forked from CMCDragonkai/memory_layout.md
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore