remove basedir
This commit is contained in:
		| @ -1,4 +1,4 @@ | |||||||
| <?php | <?php | ||||||
|  | $NMAP_OPTIONS = '-PSssh,http,https,msrpc,microsoft-ds -F -T5'; | ||||||
| $NMAP_OPTIONS = '-Pn -F -T5'; |  | ||||||
| $SCANS_DIR = 'scans'; | $SCANS_DIR = 'scans'; | ||||||
|  | ?> | ||||||
							
								
								
									
										9
									
								
								scan.php
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								scan.php
									
									
									
									
									
								
							| @ -1,9 +1,4 @@ | |||||||
| <?php | <?php | ||||||
|  |  | ||||||
| ini_set('display_errors', '1'); |  | ||||||
| ini_set('display_startup_errors', '1'); |  | ||||||
| error_reporting(E_ALL); |  | ||||||
|  |  | ||||||
| include_once 'config.php'; | include_once 'config.php'; | ||||||
|  |  | ||||||
| $targets = filter_input(INPUT_GET, 'targets', FILTER_VALIDATE_REGEXP, [ | $targets = filter_input(INPUT_GET, 'targets', FILTER_VALIDATE_REGEXP, [ | ||||||
| @ -28,7 +23,9 @@ if (file_exists($initPath)) { | |||||||
|     $initPath = ''; |     $initPath = ''; | ||||||
| } | } | ||||||
|  |  | ||||||
| $result = `nmap $NMAP_OPTIONS --stylesheet stylesheet.xsl -oX - $targets`; | $basedir = "{$_SERVER['REQUEST_SCHEME']}://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}".dirname($_SERVER['REQUEST_URI']); | ||||||
|  |  | ||||||
|  | $result = `nmap $NMAP_OPTIONS --stylesheet $basedir/stylesheet.xsl -oX - $targets`; | ||||||
|  |  | ||||||
| if ($result) { | if ($result) { | ||||||
|     $xml = new DOMDocument(); |     $xml = new DOMDocument(); | ||||||
|  | |||||||
| @ -1,5 +1,5 @@ | |||||||
| .header svg { | .header svg { | ||||||
|     margin: -.5em -.4em -.5em -.4em; |     margin: -.3em -.5em -.5em -.4em; | ||||||
|     fill: currentColor; |     fill: currentColor; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | |||||||
| @ -242,16 +242,11 @@ Exemple: scanme.nmap.org microsoft.com/24 192.168.0.1 10.0-255.0-255.1-254" patt | |||||||
|             </xsl:attribute> |             </xsl:attribute> | ||||||
|             <xsl:if test="service/@name='ftp' or service/@name='ssh' or service/@name='http' or service/@name='https'"> |             <xsl:if test="service/@name='ftp' or service/@name='ssh' or service/@name='http' or service/@name='https'"> | ||||||
|                 <xsl:attribute name="href"> |                 <xsl:attribute name="href"> | ||||||
|                     <xsl:value-of select="service/@name" /> |                     <xsl:value-of select="service/@name" />://<xsl:value-of select="$hostAddress" />:<xsl:value-of select="@portid" /> | ||||||
| ://                    <xsl:value-of select="$hostAddress" /> |  | ||||||
| :                    <xsl:value-of select="@portid" /> |  | ||||||
|                 </xsl:attribute> |                 </xsl:attribute> | ||||||
|             </xsl:if> |             </xsl:if> | ||||||
|             <xsl:if test="service/@name='ms-wbt-server'"> |             <xsl:if test="service/@name='ms-wbt-server'"> | ||||||
|                 <xsl:attribute name="href"> |                 <xsl:attribute name="href">rdp.php?v=<xsl:value-of select="$hostAddress" />:<xsl:value-of select="@portid" /> | ||||||
|                     <xsl:value-of select="$basedir" /> |  | ||||||
| /rdp.php?v=<xsl:value-of select="$hostAddress" /> |  | ||||||
| :                <xsl:value-of select="@portid" /> |  | ||||||
|             </xsl:attribute> |             </xsl:attribute> | ||||||
|         </xsl:if> |         </xsl:if> | ||||||
|         <xsl:if test="(service/@name='microsoft-ds' or service/@name='netbios-ssn') and ../../hostscript/script[@id='smb-shares-size']/table"> |         <xsl:if test="(service/@name='microsoft-ds' or service/@name='netbios-ssn') and ../../hostscript/script[@id='smb-shares-size']/table"> | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user