Python Script: Retrieve Joomla Version

by Vince
in Blog
Hits: 1471

#!/usr/bin/python
import urllib2
import sys
print "[*] Target URL format = http://www.mydomain.com"
host = raw_input("[*] Enter target URL: ")
path = '/README.txt'
combined = host + path
url = urllib2.urlopen(combined)
print
print ("fetching... ") + combined
html = url.readlines()[:10]
for line in html:
if 'Joomla!' in line:
print
sys.stdout.write(line)
print