1747344339

This commit is contained in:
2025-05-15 15:25:39 -06:00
parent 2752101070
commit 728f2c861d
6 changed files with 31 additions and 12 deletions
+5 -3
View File
@@ -10,12 +10,14 @@
*/
@font-face {
font-family: 'Comic Code Regular';
src: url('fonts/ComicCodeRegular.otf');
font-family: "Comic-Code-Regular";
src: url("fonts/Comic-Code-Regular.ttf"),
url("fonts/Comic-Code-Regular.woff"),
url("fonts/Comic-Code-Regular.otf");
}
body {
font-family: "Comic Code Regular", "Comic Sans MS", 'Courier New', Courier, monospace;
font-family: "Comic-Code-Regular", "Comic Sans MS", "Comic Sans", sans-serif;
font-weight: bold;
color: #800080;
+5 -5
View File
@@ -5,16 +5,16 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/princesspi-default-css.css">
<link rel="icon" type="css/img/" href="css/img/favicon.ico">
<script src="js/princesspi-default-js.js"></script>
<title>Princess Pi's Magical Nmap Web Thingy!</title>
</head>
<body>
<h1>Princess Pi's Magical Nmap Web Thingy!</h1>
<form action="run_scan.php" method="post">
<label for="nmapcmd">nmap command</label>
<br>
<input type="text" name="nmapcmd">
<input type="submit" value="Go, Baby, Go!">
</form>
<input type="text" id="nmapcmd" name="nmapcmd">
<input type="button" onclick="runNmapScan()" value="Go, Baby, Go!">
<br>
<span class="hidden" id="out"></span>
<script src="js/princesspi-default-js.js"></script>
</body>
</html>
+15
View File
@@ -14,6 +14,8 @@ function copyToClipboard(ID) {
function xhrSuccess(xhrRet) {
let xhrResponseText = xhrRet.target.responseText;
getID('out').innerHTML = '<a href="'+xhrResponseText+'">Scan Report Here ('+xhrResponseText+')</a>';
getID('out').style.display = "inline";
}
function xhr404(xhrRet) {
@@ -43,7 +45,13 @@ function doXhr(xhrFilePath, xhrMethod='GET', xhrPostData=null) {
const xhr = new XMLHttpRequest();
xhr.addEventListener("loadend", xhrLoadend);
xhr.open(xhrMethod, xhrFilePath);
if(xhrMethod == 'POST') {
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(xhrPostData);
} else {
xhr.send();
}
}
function changeFavIcon(icoFile) {
@@ -59,3 +67,10 @@ function changeFavIcon(icoFile) {
icoLink.href = icoFile;
}
function runNmapScan() {
let nmapcmd = getID('nmapcmd').value;
console.log(nmapcmd);
let postData = 'nmapcmd='+encodeURIComponent(nmapcmd);
doXhr('run_scan.php', 'POST', postData);
}
-1
View File
@@ -14,5 +14,4 @@
echo $web_name;
$exec = shell_exec($run_cmd);
echo $exec;
?>
+3
View File
@@ -0,0 +1,3 @@
xhr->run_scan.php
fix perms
auth system
+1 -1
View File
@@ -269,7 +269,7 @@
tr {
vertical-align:top;
font-family: "Comic-Code-Regular","Comic Sans MS", "Comic Sans", sans-serif;
font-family: "Comic-Code-Regular", "Comic Sans MS", "Comic Sans", sans-serif;
font-size: 1em;
color: #800080;
background-color: #FFB4C0;