Commits

Tim Tomes  committed be9e6c7

minor bug fixes to the phpinfo module.

  • Participants
  • Parent commits 0ca48d8

Comments (0)

Files changed (2)

File data/.gitignore

 *
 !.gitignore
 !hostnames.txt
+!av_domains.lst

File modules/auxiliary/phpinfo.py

                      'Comments': [
                                   'Source options: db, <hostname>, <path/to/infile>',
                                   'Reference: http://php.net/manual/en/function.phpinfo.php',
-                                  'Google Dorks: inurl:phpinfo.php + ext:php',
-                                  'inurl:test.php + intitle:phpinfo() + ext:php',
+                                  'Google Dorks:',
+                                  '%sinurl:phpinfo.php ext:php' % (self.spacer),
+                                  '%sinurl:test.php intitle:phpinfo() ext:php' % (self.spacer)
                                   ]
                      }
 
         for host in hosts:
             for proto in protocols:
                 for filename in files:
-	            url = '%s://%s/%s' % (proto, host, filename)
-	            try:
-	                resp = self.request(url, redirect=False)
-	                code = resp.status_code
-	            except KeyboardInterrupt:
-	                print ''
-		        return
-	            except:
-		        code = 'Error'
-	            if code == 200 and 'phpinfo()' in resp.text:
-		        self.alert('%s => %s. phpinfo() page found!' % (url, code))
-		        cnt += 1
-		    else:
-		       if verbose: self.output('%s => %s' % (url, code))
+                    url = '%s://%s/%s' % (proto, host, filename)
+                    try:
+                        resp = self.request(url, redirect=False)
+                        code = resp.status_code
+                    except KeyboardInterrupt:
+                        print ''
+                        return
+                    except:
+                        code = 'Error'
+                    if code == 200 and 'phpinfo()' in resp.text:
+                        self.alert('%s => %s. phpinfo() page found!' % (url, code))
+                        cnt += 1
+                    else:
+                        if verbose: self.output('%s => %s' % (url, code))
         self.output('%d phpinfo() pages found' % (cnt))