This article is now published on my website: Prefer Subshells for Context.
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 python3 | |
# This script is designed to do one thing and one thing only. It will find each | |
# of the FlateDecode streams in a PDF document using a regular expression, | |
# unzip them, and print out the unzipped data. You can do the same in any | |
# programming language you choose. | |
# | |
# This is NOT a generic PDF decoder, if you need a generic PDF decoder, please | |
# take a look at pdf-parser by Didier Stevens, which is included in Kali linux. | |
# https://tools.kali.org/forensics/pdf-parser. | |
# |
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
// Defines a better type querry function that enables object prototypes to define their own type repr | |
$typeof = function(value) { | |
return value.__proto__.type || typeof(value); | |
} | |
// Switch to 'release' (or any other value) to disable expensive typechecking. | |
releaseMode = 'debug'; |
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
javascript: (function () { | |
var things = document.querySelectorAll("div.thing"); | |
for (var j = things.length - 1; j > 0; j--) { | |
var thing = things[j], | |
entry = thing.querySelectorAll("div.entry")[0], | |
thumb = thing.querySelectorAll("a.thumbnail")[0], | |
img = new Image; | |
img.style.display = 'block'; | |
if (thumb) { | |
var href = thumb.href; |
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
/***************************************************************************** | |
* Copyright (c) 2011 Kenneth Waters | |
* | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a | |
* copy of this software and associated documentation files (the "Software"), | |
* to deal in the Software without restriction, including without limitation | |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
* and/or sell copies of the Software, and to permit persons to whom the | |
* Software is furnished to do so, subject to the following conditions: |
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
import os | |
import shutil | |
import subprocess | |
import sys | |
import tarfile | |
import urllib2 | |
LIBXML2_PREFIX = "libxml2" | |
LIBXSLT_PREFIX = "libxslt" | |
LIBXML2_FTPURL = "ftp://xmlsoft.org/libxml2/" |