Skip to content

Instantly share code, notes, and snippets.

View vxcute's full-sized avatar
💻
programming

astro vxcute

💻
programming
  • Alexandria, Egypt
View GitHub Profile
'''
a python script to set a static IPv4 address to a network interface but first checks if its unique
by doing an ARP probe.
'''
from scapy.all import *
import socket, fcntl
import os
import argparse
;; a 64-bit ELF file from scratch using FASM that prints a hello world
use64
ELFCLASS64 = 0x2
ELFDATA2LSB = 0x1
EV_CURRENT = 0x1
ELF_ABI_SYSV = 0x1
ET_EXEC = 0x2
EM_X86_64 = 0x3e
// high performant concurrent fibonacci numbers generator
package main
import (
"fmt"
"math/big"
)
func fib() chan string {
package bintree
import "fmt"
type Node[T any] struct {
key int
value T
right *Node[T]
left *Node[T]
}
package main
import (
"errors"
"log"
)
const R = 256
type TrieNode[T any] struct {
// custom channels in go
// I learned how go-channels can be implemented in C++ and decided to make it in go haha wtf
// I saw this https://st.xorian.net/blog/2012/08/go-style-channel-in-c/ great article
package main
import (
"log"
"sync"
)
// sends fake keyboard events to uinput this example print 'a' to the terminal
package main
// #cgo CFLAGS: -g -Wall
// #include <linux/uinput.h>
import "C"
import (
"encoding/binary"
"io"
package main
import (
"fmt"
)
const CharsNum = 256
type TrieNode struct {
children [CharsNum] *TrieNode
// simple example on using win32 api from golang
package main
import (
"errors"
"fmt"
"log"
"unsafe"
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
"time"
)