Forked from markpundsack/heroku-CVE-2013-0156.rb
Last active
December 10, 2015 23:49
-
-
Save DotDotJames/4512454 to your computer and use it in GitHub Desktop.
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
@echo off | |
:: The quick-and-nasty CVE-2013-0156 Heroku inspector! | |
:: Originally brought to you by @elliottkember with changes by @markpundsack @ Heroku | |
:: This fork created by @aghilmort of @thoughtpuzzle for windows platforms | |
:: Download and run using: | |
:: cmd heroku-CVE-2013-0156.bat | |
:: alternatively, run next line from command line to check apps individually | |
:: heroku run bundle show rails --app YOUR_HEROKU_APP_NAME | |
@echo Retrieving apps list from Heroku. | |
@echo This step may take a few...minutes... | |
@echo. | |
cmd /C "heroku list > heroku_apps.txt" | |
@echo Cleaning up apps list. | |
find /v "=" heroku_apps.txt | find /v ".TXT" | findstr /r /v /c:"^$" > heroku_apps_list.txt | |
@echo. | |
@echo Looping over apps to get Rails versions | |
@echo This step will take a while, perhaps minutes / app | |
@echo Go, get some coffee, we're working...really, it's ok | |
@echo. | |
@echo on | |
for /F "tokens=1" %%i in (heroku_apps_list.txt) do heroku run bundle show rails --app %%i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lists your Rails app versions at Heroku from the windows command line shell, cmd.
Running below from command line will copy this gist to local batch file, heroku_rails_apps.bat and execute it:
cmd /C "curl https://gist.github.com/raw/4512454/371c4c53ea368bff5250243ad333108b6766d1ad/heroku_CVE_2013_0156.bat > heroku_rails_apps.bat & heroku_rails_apps.bat"