This file contains 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
$ gcc -masm=intel inlineasm.c | |
$ ./a.out | |
saved_ebp = 0 | |
saved_eip = b7e444d3 | |
argc = 1 | |
argv = bffff864 | |
envp = bffff86c | |
$ objdump -d a.out | sed -n '/<main>:/,/^$/p' |
This file contains 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
$ uname -a | |
Linux vm-ubuntu64 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux | |
$ gcc test_malloc.c | |
$ ./a.out | |
[+] allocate chunks: a = malloc(32), b = malloc(256), c = malloc(32) | |
a = 0x832010, b = 0x832040, c = 0x832150 | |
*a = 41414141, *b = 42424242, *c = 45524548 | |
[+] free the mid chunk: free(b) |
This file contains 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
$ python yt2m4a.py "http://www.youtube.com/watch?v=4YMD6xELI_k" | |
--2014-04-11 02:25:26-- http://r2---sn-ogueyn7z.googlevideo.com/videoplayback?sparams=id%2Cip%2Cipbits%2Citag%2Cpcm2fr%2Cratebypass%2Csource%2Cupn%2Cexpire&ipbits=0&mt=1397150542&expire=1397173854&upn=15FckWnBsJw&fexp=927905%2C936905%2C901065%2C916623%2C945513%2C937417%2C913434%2C936916%2C934022%2C936921%2C936923&signature=A2B6A3A92CCB9F6F09EDEC21266137C2A09975DF.A94CC65958FD475F79CE18DDF05188C29591C7A0&key=yt5&ip=123.224.99.3&pcm2fr=yes&itag=22&source=youtube&sver=3&mv=u&ratebypass=yes&ms=au&id=o-ADTX4MBPHtBDylBsjOsDle1msEAsW4PTJ7EyQH0qyPo1 | |
Resolving r2---sn-ogueyn7z.googlevideo.com (r2---sn-ogueyn7z.googlevideo.com)... 74.125.171.39 | |
Connecting to r2---sn-ogueyn7z.googlevideo.com (r2---sn-ogueyn7z.googlevideo.com)|74.125.171.39|:80... connected. | |
HTTP request sent, awaiting response... 302 Found | |
Location: http://r13---sn-ogueyn7z.googlevideo.com/videoplayback?sparams=id%2Cip%2Cipbits%2Citag%2Cpcm2fr%2Cratebypass%2Csource%2Cupn%2Cexpire&ipbits=0& |
This file contains 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
$ echo -n 'hello world' | python rot.py | |
hello world | |
ifmmp xpsme | |
jgnnq yqtnf | |
khoor zruog | |
lipps asvph | |
mjqqt btwqi | |
nkrru cuxrj | |
olssv dvysk | |
pmttw ewztl |
This file contains 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
$ wget http://printkjv.ifbweb.com/AV_txt.zip | |
2014-06-09 15:30:46 (535 KB/s) - `AV_txt.zip' saved [1262589/1262589] | |
$ unzip AV_txt.zip | |
Archive: AV_txt.zip | |
inflating: AV1611Bible.txt | |
$ python ngram.py < AV1611Bible.txt | |
1 gram result: | |
414963 'e' |
This file contains 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
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <numeric> | |
#include <functional> | |
using namespace std; | |
template <typename T> | |
auto cube(T x) -> decltype(x) | |
{ |
This file contains 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
$ seq 100 | factor | awk 'NF==2{print $2}' | |
2 | |
3 | |
5 | |
7 | |
11 | |
13 | |
17 | |
19 | |
23 |
This file contains 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
$ while read; do echo -n "$REPLY" | od -tx1z; done | |
hoge | |
0000000 68 6f 67 65 >hoge< | |
0000004 | |
fuga | |
0000000 66 75 67 61 >fuga< | |
0000004 |
This file contains 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
$ grep -boa $'\xc9\xc3' a.out | awk -F: '{printf "0x%x\n", $1}' # leave; ret | |
0x401 | |
0x466 |
This file contains 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
$ curl -IL http://t.co/kzZyfMkRFl | |
HTTP/1.1 301 Moved Permanently | |
cache-control: private,max-age=300 | |
content-length: 0 | |
date: Mon, 21 Jul 2014 13:32:44 GMT | |
expires: Mon, 21 Jul 2014 13:37:44 GMT | |
location: http://htn.to/jKGE4e | |
server: tfe | |
set-cookie: muc=a00e470a-8304-4e1d-b87d-597a02b0a98f;Domain=t.co;Expires=Sat, 02-Jul-2016 13:32:44 GMT |
OlderNewer