Skip to content

Instantly share code, notes, and snippets.

View kittinan's full-sized avatar
🇹🇭
:(){ :|:& };:

Kittinan kittinan

🇹🇭
:(){ :|:& };:
View GitHub Profile
@kittinan
kittinan / timelapse.md
Created July 16, 2017 05:19 — forked from porjo/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

@kittinan
kittinan / measure.sql
Created June 29, 2017 03:16
Mysql Index Size
SELECT count(*) tables,
concat(round(sum(table_rows)/1000000,2),'M') rows,
concat(round(sum(data_length)/(1024*1024*1024),2),'G') data,
concat(round(sum(index_length)/(1024*1024*1024),2),'G') idx,
concat(round(sum(data_length+index_length)/(1024*1024*1024),2),'G') total_size,
round(sum(index_length)/sum(data_length),2) idxfrac
FROM information_schema.TABLES
WHERE table_name like "%TABLE%";
@kittinan
kittinan / eternalblue8_exploit.py
Created May 18, 2017 02:15 — forked from worawit/eternalblue8_exploit.py
Eternalblue exploit for Windows 8/2012
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
import sys
import socket
'''
EternalBlue exploit for Windows 8 and 2012 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
import sys
import socket
'''
EternalBlue exploit by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)
@kittinan
kittinan / thai-gtts.py
Created March 16, 2017 02:28
Thai gTTS
from gtts import gTTS
import os
tts = gTTS(text='สวัสดี ภาษาไทย', lang='th')
tts.save('hello-thai.mp3')
os.system('mpg321 hello-thai.mp3')
@kittinan
kittinan / root.sh
Created October 27, 2016 07:07 — forked from Arinerron/root.sh
"Root" via dirtyc0w privilege escalation exploit (automation script) / Android (32 bit)
#!/bin/bash
# Give the usual warning.
clear;
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds...";
sleep 10;
clear;
# Download and extract exploit files.
echo "[INFO] Downloading exploit files from GitHub...";

Keybase proof

I hereby claim:

  • I am kittinan on github.
  • I am kittinan (https://keybase.io/kittinan) on keybase.
  • I have a public key whose fingerprint is 0CA4 6DAF 3735 4AEE BC83 2853 2D67 4B7A BE39 EBA8

To claim this, I am signing this object:

#!/bin/bash
#################################################
# This Script will Audit PHP For basic Security
# Author:- Kaustubh Padwad
#################################################
echo "Please Enter The Path Of php in front of script"
#Expose php This should be OFF
GPASS="php Expose"
#!/bin/bash
# Get the device id of the Synaptics TouchPad
id=12
# Get the current state of the Device Enabled property
# The devString will look like: "Device Enabled (132): 0"
devString=$(xinput --list-props $id | grep "Device Enabled")
# Parse the devString into an array
read -a devString_array <<< "$devString"
@kittinan
kittinan / sensor.sh
Created March 12, 2016 14:48
sensor for orange pi
#/bin/bash
while (true); do
cpu_cur=$(( `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq` / 1000 ))
cpu_max=$(( `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq` / 1000 ))
cpu_min=$(( `cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq` / 1000 ))
cpu_cur="$(printf "%4s" $cpu_cur)"
cpu_max="$(printf "%4s" $cpu_max)"
cpu_min="$(printf "%4s" $cpu_min)"
tempr=`cat /sys/devices/virtual/hwmon/hwmon1/temp1_input`
tempr="$(printf "%3s" $tempr)"