Skip to content

Instantly share code, notes, and snippets.

View recolic's full-sized avatar
🏠
Working from home

Recolic recolic

🏠
Working from home
View GitHub Profile
@recolic
recolic / junk_stupid_trunk.ino
Last active November 6, 2017 13:06
HUST junk.
/*
* Reconstructed by Recolic Keghart.
* Nov 1, 2017
* LICENSE := GPLv3
*/
#define STANDARD_SPEED 200
#define SLOW_WHILE_AUTO_DRIVE 0.9
int usual_speed = STANDARD_SPEED;
int bReverseMode = 0;
int bForceBoost = 0;
@recolic
recolic / bbr_enable.sh
Created September 1, 2017 08:01
One-key enable bbr.
#!/bin/bash
uname -r | grep -E '^4\.(1[^\.]|9)' > /dev/null
(( $? == 1 )) && echo 'Linux kernel version must >= 4.9' && exit 1
[[ `whoami` != root ]] && echo 'You must be root' && exit 1
lsmod | grep bbr > /dev/null
(( $? == 1 )) &&
modprobe tcp_bbr &&
@recolic
recolic / dirty_passwd_adjust_cow.c
Created March 4, 2017 21:51 — forked from ngaro/dirty_passwd_adjust_cow.c
A dirty cow exploit that automatically finds the current user in passwd and changes it's uid to 0
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/stat.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>