Advertisement
iAnonGuy

~ JoOmla Version Finder ~

Mar 25th, 2016
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <#
  2.      ~ Coded by AnonGuy ~
  3. [~] an0nguy [at] protonmail.ch
  4. [~] http://blog.lolwaleet.com
  5.  
  6. Usage ~ Just replace "D:\joomla.txt" with your list of joomla websites
  7. Pic ~ http://i.imgur.com/5ofqvSD.png
  8.  
  9. Note ~ If the site is not using joomla/admin hid the file which discloses the version it'd throw an error and show previous site's version -- Can check if it throws a 404 using System.Net.WebRequest but naah xD
  10.  
  11. PS ~ The "color-Write" function is coded by Jesse Chisholm.
  12. #>
  13. Clear-Host
  14. function color-Write{
  15. $allColors = ("-Black", "-DarkBlue", "-DarkGreen", "-DarkCyan", "-DarkRed", "-DarkMagenta", "-DarkYellow", "-Gray", "-Darkgray", "-Blue", "-Green", "-Cyan", "-Red", "-Magenta", "-Yellow", "-White")
  16. $foreground = (Get-Host).UI.RawUI.ForegroundColor # current foreground
  17. $color = $foreground
  18. [bool]$nonewline = $false
  19. $sofar = ""
  20. $total = ""
  21. foreach($arg in $args){
  22. if ($arg -eq "-nonewline") { $nonewline = $true }
  23. elseif ($arg -eq "-foreground"){
  24. if ($sofar) {Write-Host $sofar -foreground $color -nonewline}
  25. $color = $foregrnd
  26. $sofar = ""}
  27. elseif ($allColors -contains $arg){
  28. if ($sofar) { Write-Host $sofar -foreground $color -nonewline }
  29. $color = $arg.substring(1)
  30. $sofar = ""}
  31. else {
  32. $sofar += "$arg "
  33. $total += "$arg "}}
  34. if (!$nonewline) {Write-Host $sofar -foreground $color}
  35. elseif($sofar) {Write-Host $sofar -foreground $color -nonewline}}
  36. $c = 0
  37. color-Write -White "--------------------------------------------------"
  38. color-Write -White "-        " JoOmla Version Finder by -Red AnonGuy -White "      -"
  39. color-Write -White "--------------------------------------------------"
  40. foreach ($x in get-content D:\joomla.txt){
  41. $url = $x + "/language/en-GB/en-GB.xml"
  42. $z = New-Object Xml.XmlDocument
  43. $z.Load($url)
  44. $t = $z.metafile.version[1]
  45. $global:c++
  46. color-Write -Yellow [$global:c] -Cyan "--" -White $x -Cyan "--" -Red $t}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement