This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var emolist=[ | |
{"chars" : " :) ", "class" : "emoticon_smile", "name" : "Smiley"}, | |
{"chars" : " :( ", "class" : "emoticon_frown", "name" : "Frown"}, | |
{"chars" : " :P ", "class" : "emoticon_tongue", "name" : "Tongue"}, | |
{"chars" : " :D ", "class" : "emoticon_grin", "name" : "Grin"}, | |
{"chars" : " :o ", "class" : "emoticon_gasp", "name" : "Gasp"}, | |
{"chars" : " ;) ", "class" : "emoticon_wink", "name" : "Wink"}, | |
{"chars" : " :v ", "class" : "emoticon_pacman", "name" : "Pacman"}, | |
{"chars" : " >:( ", "class" : "emoticon_grumpy", "name" : "Gruñón"}, | |
{"chars" : " :/ ", "class" : "emoticon_unsure", "name" : "Unsure"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch -n 1 'diff=$(( $(date +%s -d "16:00") - $(date +%s) )); echo $(( $diff / 60 ))":"$(( $diff % 60 ))' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {1..36} | |
do | |
curl -s http://www.etda.or.th/etda_website/category/publications.html/page:$i | \ | |
grep -P 'content.*class="news"' | \ | |
sed -re 's/ +//g' -e 's/^.*href="([^"]+)".*>(.*)<\/a>.*/\2\thttp:\/\/www.etda.or.th\1/' | |
done | tee out.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def shift(str, n) | |
before = [*'a'..'z'].join | |
after = [*'a'..'z'].rotate(n).join | |
str = str.tr(before, after).tr(before.upcase, after.upcase) | |
return str | |
end | |
str = 'Myxqbkdevkdsyxc, iye wkno sd!!' | |
26.times{|i| | |
puts "#{i}: #{shift(str,i)}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################################################################### | |
# converting bit stream into ascii string # | |
# author: ptantiku # | |
# # | |
# compile: gcc conv_bin2str.s -o conv_bin2str # | |
# usage: conv_bin2str <binary string> # | |
# example: conv_bin2str 0110100001100101011011000110110001101111 # | |
##################################################################### | |
.data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.data [5/1908] | |
hellostr: | |
.string "Hello World" | |
.text | |
.global main | |
main: | |
pushq %rbp | |
movq %rsp, %rbp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# binary tree in array | |
# | |
# author: ptantiku | |
# | |
class Node: | |
id = 0 | |
data = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# flush all iptables | |
iptables -F | |
iptables -t nat -F | |
# enable port forwarding | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
# set NAT: intranet --> eth1 --> MITM --> eth0 --> internet | |
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
iptables -A FORWARD -i eth1 -j ACCEPT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original: http://seclists.org/fulldisclosure/2015/Jun/108 | |
Modified by: ptantiku | |
------------------------------------------------------------------------------------ | |
content.html | |
------------------------------------------------------------------------------------ | |
<html> | |
<body> | |
This is not facebook.com! This is EVIL! | |
<script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
list=`iconv -l`.gsub(/[ \n]/,'').split('//') | |
list.each do |encode| | |
out = `iconv input.txt -f #{encode} -c -t UTF-8` | |
puts "#{encode}\t#{out}" | |
end |