Skip to content

Instantly share code, notes, and snippets.

View sijanec's full-sized avatar
💤
Account abandoned due to forced 2FA

Anton Luka Šijanec sijanec

💤
Account abandoned due to forced 2FA
View GitHub Profile
@sijanec
sijanec / vimrc
Last active October 15, 2020 21:36
""""""""""""""""""""""""" BEGIN VUNDLE # nevermind i will not use vindle
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
@adige
adige / check_open_ports
Created January 13, 2016 08:35
Check open ports without netstat or lsof
declare -a array=($(tail -n +2 /proc/net/tcp | cut -d":" -f"3"|cut -d" " -f"1")) && for port in ${array[@]}; do echo $((0x$port)); done
@eatnumber1
eatnumber1 / renameat2.c
Last active November 3, 2023 17:24
Command-line tool to call renameat2(2)
/*
* Copyright (c) 2023 Russell Harmon
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@gkbrk
gkbrk / slowloris.py
Last active January 13, 2022 09:28
Slowloris implementation in Python. https://github.com/gkbrk/slowloris
import socket
import random
import time
import sys
log_level = 2
def log(text, level=1):
if log_level >= level:
print(text)
@hgn
hgn / tcpdump IPv6 router advertisement
Created March 16, 2015 18:59
Capture of IPv6 advertisement message via tcpdump
@virgo:~ $ sudo tcpdump -vvvv -ttt -i eth1 icmp6 and 'ip6[40] = 134'
00:00:00.000000 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 200) fe80::b675:eff:fefa:1cb > ip6-allnodes: [icmp6 sum ok] ICMP6, router advertisement, length 200
hop limit 0, Flags [managed, other stateful], pref medium, router lifetime 1800s, reachable time 0s, retrans time 0s
source link-address option (1), length 8 (1): b4:75:0e:fa:01:cb
0x0000: b475 0efa 01cb
mtu option (5), length 8 (1): 1280
0x0000: 0000 0000 0500
prefix info option (3), length 32 (4): 2a01:ffff:43f::/64, Flags [onlink, auto], valid time 7200s, pref. time 1800s
0x0000: 40c0 0000 1c20 0000 0708 0000 0000 2a01
0x0010: ffff 043f 0000 0000 0000 0000 0000