Skip to content

Instantly share code, notes, and snippets.

@jontonsoup
Created February 19, 2013 05:05
Show Gist options
  • Save jontonsoup/4983253 to your computer and use it in GitHub Desktop.
Save jontonsoup/4983253 to your computer and use it in GitHub Desktop.
checks the security of a directory full of apks
require 'rubygems'
require 'watir-webdriver'
b = Watir::Browser.start 'http://www.android-permissions.org/'
#put your directory here
entries = Dir.entries("/Users/Jonathan/Desktop/a")
entries.each do |entry|
b.goto("http://www.android-permissions.org/")
b.link(:class, "important").click
b.file_field(:id, "file").set("/Users/Jonathan/Desktop/a/e.apk")
b.button(:name, "submit").click
text = b.div(:id, "outermost").text
puts entry + "\n"
puts text
puts "\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment