Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
quick/dirty tool to extract embeded gzip files out of the evasi0n7 jailbreak binary -- requires otool so probably OSX
#!/usr/bin/env ruby
fname = ARGV.shift
fname || exit!
sections = `otool -l \"#{fname}\" |grep -A11 ^Section`.split(/^--$/).map do |sect_txt|
lines =
Hash[{|ln| ln.strip.split(' ', 2) } ]{|sect| sect["segname"] == "__DATA" and sect["sectname"] =~ /^data_\d+$/ }
dats = do |sect|
name: sect["sectname"],
fileoffset: sect["offset"].to_i,
size: sect["size"].hex,
f =, "r")
dats.each do |dat|
f.pos = dat[:fileoffset][:name] + ".gz", 'w'){|o| o.write([:size])) }

This comment has been minimized.

Copy link
Owner Author

emonti commented Jan 10, 2014

FWIW: TaiG was data_10.gz inside the version I used this on...


This comment has been minimized.

Copy link

enzocaggiano commented Jan 10, 2014

how to use?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.