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/python | |
# tar -Oxf /Volumes/install_app/Packages/Essentials.pkg Payload|python pbzx.py|tar t | |
import subprocess | |
import struct | |
import sys | |
def pbzx(): | |
if sys.stdin.read(4) != "pbzx": | |
print "Not a pbzx stream" |
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
#!/bin/bash | |
function inet_aton () { | |
local count=3 | |
local int=0 | |
for num in $(echo $1 | sed -e 's/\./ /g'); do | |
let "int+=$num*256**$count" | |
let "count-=1" | |
done | |
echo $int | |
} |