Skip to content

Instantly share code, notes, and snippets.

View geyslan's full-sized avatar
🚲
...

Geyslan Gregório geyslan

🚲
...
View GitHub Profile
@geyslan
geyslan / shell_bind_tcp.c
Last active June 7, 2022 01:30
Shell Bind TCP in C Language (Linux/x86) - forlife
// This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/1st.assignment/shell_bind_tcp.c
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <unistd.h>
int main()
{
@geyslan
geyslan / shell_bind_tcp.asm
Last active October 7, 2023 10:00
Shell Bind TCP in Assembly (Linux/x86) - forlife
; This is a snippet of the original file in https://github.com/geyslan/SLAE/blob/master/1st.assignment/shell_bind_tcp.asm
global _start
section .text
_start:
; syscalls (/usr/include/asm/unistd_32.h)
; socketcall numbers (/usr/include/linux/net.h)