X-Git-Url: http://git.pjr.cc/?p=configmanager.git;a=blobdiff_plain;f=lib%2Fscreenos.plugin.php;h=30da6078c5aba68162b8fd76de9f5034d1fe7168;hp=7b1f2db1269b88ac8679008d5bcacbbdaa2b094b;hb=779ccbdea52a495b9150c12c6d69af2aa370d8f1;hpb=843363a8f4dca2460800d5c3c72b559cce15c99f diff --git a/lib/screenos.plugin.php b/lib/screenos.plugin.php index 7b1f2db..30da607 100644 --- a/lib/screenos.plugin.php +++ b/lib/screenos.plugin.php @@ -2,10 +2,15 @@ $HOST_TYPE["screenos"]["name"] = "Netscreen Screen OS"; $HOST_TYPE["screenos"]["configform"] = "nsos_formFunction"; $HOST_TYPE["screenos"]["postfunction"] = "nsos_postFunction"; +$HOST_TYPE["screenos"]["updateconfig"] = "nsos_updateConfig"; +$HOST_TYPE["screenos"]["detail"] = "nsos_detail"; +$HOST_TYPE["screenos"]["getconfig"] = "nsos_getConfigFromDB"; function nsos_formFunction() { ?> +Note: If your router/firewall/device uses a one-time password, leave these blank and manually update from the +home page
Name
Password
Method @@ -14,14 +19,116 @@ Method
+Password
+
+ +"; + return 0; + } + + //error_log("getting config with ".$hconf["username"]." and ".$conf["password"]); + echo "Got config, saving it to db
"; + $lastupdate = time(); + db_updateData("hosts", "lastupdate", "$lastupdate", "hostip", "$hip"); + db_insertData("configs", "$hip", "$lastupdate", base64_encode($config)); + + echo "Config is:
";
+	echo $config;
+	echo "
"; +} + +function nsos_getConfig($host, $username, $password) { - genericssh_ssh($host, $username, $password, "cli show configuration"); + return genericssh_ssh($host, $username, $password, "cli show configuration"); } ?> \ No newline at end of file