コード例 #1
0
ファイル: folderPath.php プロジェクト: bill-lonely/snortdlp
    $includeSubfolders = $_POST['includeSubfolders'];
}
if ($processFolder) {
    $config = getConfig();
    $snortFile = $config['snortFile'];
    $substringLength = $config['substringLength'];
    if (isset($_POST['local'])) {
        processFolder($path, $path, $includeSubfolders, $scoringMethod, $substringLength, $snortFile);
    } else {
        if (isset($_POST['network'])) {
            $ip = $_POST['ip'];
            $user = $_POST['user'];
            $pass = $_POST['pass'];
            $folder = $_POST['location'];
            $netPath = "//" . $ip . ($folder[0] == "/" ? $folder : "/" . $folder . "/");
            $path = openShare($ip, $user, $pass, $folder);
            processFolder($path, $netPath, $includeSubfolders, $scoringMethod, $substringLength, $snortFile);
            closeShare();
        }
    }
}
?>
	<div id="page">
		<div id="content">
		  <div class="post">
				<div class="entry">
				<h2 class="title">Process Network Folder</a></h2>
					<form action="folderPath.php" method="post">
						<table>
						<tr><td><b>IP Address: </b></td<td><input type="text" id="ip" name="ip"/></td>
							<td><b>Network Folder: </b></td<td><input type="text" id="location" name="location"/></td>    
コード例 #2
0
ファイル: inputFile.php プロジェクト: bill-lonely/snortdlp
        if (isset($_POST['local'])) {
            processFile(1, $path, $path, $scoringMethod, $substringLength, $snortFile);
        } else {
            if (isset($_POST['network'])) {
                $ip = $_POST['ip'];
                $user = $_POST['user'];
                $pass = $_POST['pass'];
                $path = $_POST['path'];
                $netPath = "//" . $ip . ($path[0] == "/" ? $path : "/" . $path);
                $parts = explode("/", $path);
                //get our path element parts
                $fileName = array_pop($parts);
                $path = implode("/", $parts);
                //rebuild our path
                $netPath = "//" . $ip . ($path[0] == "/" ? $path : "/" . $path) . ($path[strlen($path) - 1] == "/" ? "" : "/");
                $path = openShare($ip, $user, $pass, $path) . $fileName;
                processFile(1, $path, $netPath, $scoringMethod, $substringLength, $snortFile);
                closeShare();
            }
        }
    }
}
?>
	<div id="page">
		<div id="content">
		  <div class="post">
				<div class="entry">
				
				<h2 class="title">Process Network File</a></h2>
					<form action="inputFile.php" method="post">
						<table>