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
[Desktop Entry] | |
Type=Application | |
Version=22.3 | |
Name=eclipse | Android Developer Tools | |
GenericName=Integrated Development Environment for Android | |
Comment=A powerful IDE | |
Exec=/home/nick/adt-bundle-linux-x86-20131030/eclipse/eclipse | |
Icon=/home/nick/adt-bundle-linux-x86-20131030/eclipse/icon.xpm | |
Terminal=false | |
Categories=GTK;Development;IDE; |
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
#!/usr/bin/env python | |
""" | |
Set the PYTHONSTARTUP environment variable in our .bashrc (or .bash_profile if you're using that). If the PYTHONSTARTUP variable is set to a readable file, then the contents of that file will be run before anything else when the interactive interpreter is run | |
echo "export PYTHONSTARTUP=~/.pythonrc" >> .bashrc | |
""" | |
import rlcompleter, readline | |
readline.parse_and_bind('tab:complete') |
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
#!/usr/bin/env python | |
class BST(): | |
value = None | |
left = None | |
right = None | |
def __init__(self, value=None): | |
self.value = value | |
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 -m compileall stackBlown.py | |
# You could also do this programatically | |
# >>> import py_compile | |
# >>> py_compile.compile('stackBlown.py') | |
# | |
# Note that you need to use Python to run the pyc file as it's not an executable | |
# | |
# The dis module would even let you pull the resultant bytecode back out again! |
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
/* Shellcode from repo.shell-storm.org/shellcode | |
* 17twenty/Nick Glynn | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#if __x86_64__ | |
/* | |
* ;rdi 0x4005c4 0x4005c4 |
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
We're going to use the code from Stripe's Capture the Flag 1.0: | |
----------------------8<----------------------- | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
void fun(char *str) | |
{ | |
char buf[1024]; |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <sys/ioctl.h> | |
#include <sys/socket.h> | |
#include <linux/if_ether.h> | |
#include <linux/if_packet.h> | |
#include <linux/if_arp.h> | |
#include <arpa/inet.h> |
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
level10@io:~$ python /tmp/runme.py | |
/levels/level10: relocation error: /levels/level10: symbol _gmon_start__, version GLIBC_2.1 not defined in file libc.so.6 with link time reference | |
/levels/level10: relocation error: /levels/level10: symbol _start__, version GLIBC_2.1 not defined in file libc.so.6 with link time reference | |
/levels/level10: symbol lookup error: /levels/level10: undefined symbol: strcmp, version GLIBC_2.2.4 | |
Inconsistency detected by ld.so: dl-runtime.c: 87: _dl_fixup: Assertion `((reloc->r_info) & 0xff) == 7' failed! | |
*** glibc detected *** /levels/level10: double free or corruption (!prev): 0x0804a008 *** | |
======= Backtrace: ========= | |
/lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x70f01)[0xb7edff01] | |
/lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x72768)[0xb7ee1768] | |
/lib/i386-linux-gnu/i686/cmov/libc.so.6(cfree+0x6d)[0xb7ee48ad] |
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 -std=c99 due to loop initialiser - stupid GCC defaulting to C89 :( */ | |
#include <stdio.h> | |
#define ARRAY_SIZE(x) \ | |
((sizeof(x) / sizeof(x[0]))) | |
void count_and_process_items(unsigned int (*array)[10]) | |
{ | |
for (int i = 0; i < ARRAY_SIZE(*array); ++i) { | |
printf("Item %d = %d\n", i, (*array)[i]); |
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
# Replace the .sh and .txt in the next line with the current and future file suffixes | |
for i in $(find . -iname *\.sh -print;) ; do mv "$i" "$(dirname $i)/$(basename -s .sh $i).txt"; done |
OlderNewer