Skip to content

Instantly share code, notes, and snippets.

@creative-sensor
creative-sensor / no_module_version_check.config
Created October 26, 2016 15:39
Build kernel with this config file will allow module not having to be checked version before loading every new build version of module. No need to rebuild entire kernel anymore everytime change applied only to one module only.
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.18.31 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
@creative-sensor
creative-sensor / list.h
Created November 3, 2016 22:28
Kernel linked list for userspace
#ifndef _LINUX_LIST_H
#define _LINUX_LIST_H
#include <linux/types.h>
//#include <linux/stddef.h>
//#include <linux/poison.h>
//#include <linux/const.h>
//#include <linux/kernel.h>
#include <unistd.h>
/*
@creative-sensor
creative-sensor / ipush
Created February 21, 2017 15:59
Push file data through long ssh pipe
#!/bin/bash -x
SRC=$1
DST=$2
DEV="hostname of intermediary"
PI=$(<~/.pi)
ssh_dev="ssh -A $DEV"
ssh_dump_pi="ssh $PI 'sudo bash -c \"cat > "$DST"\"'"
# Green for dark background
COLOR1='\[\033[38;5;34m\]'
# Dark Pink for bright background (ROOT user)
COLOR2='\[\033[38;5;161m\]'
# Blue for bright background
COLOR3='\[\033[38;5;26m\]'
@creative-sensor
creative-sensor / ssh
Last active September 17, 2017 07:52
# Reversed ssh: acts like trojan that open backdoor behind firewall by tunneling
1/ Confined host (behind firewall) ------ ssh tunnel XYZ -----> freedom host:22
2/ Confined host (localhost:22) <----- ssh forward inside tunnel XYZ --------- freedom host (localhost:11111) <---- ssh --- User
Run this command from confined host:
ssh -R localhost:11111:localhost:22 username@freedom_host
#!/bin/bash
####################### ORACLE NOTES ###################################
## Use Vim:searchIndex() to search index ##
## Ex: searchIndex list tablespace ##
########################################################################
#tablespace , tablespace-management ,
set laststatus=2
set ruler
set cursorline
set hlsearch
set nowrap
set expandtab
set tabstop=4
set mouse=a
filetype plugin on
#follow-redirect , auto-redirect ,
curl -L example.com
#filter-file-system-call ,
strace -Tfe trace=open,read,write ./program
@creative-sensor
creative-sensor / notes
Last active April 20, 2018 07:06
tips and tricks
# match repeated characters "(aaa)baa(bbb)cdd
echo aaabaabbbcdd | grep -E '(.)\1\1' -
# python , print-json-pretty ,
echo '{1.2:3.4}' | python -mjson.tool