Skip to content

Commit

Permalink
Merge pull request #155 from dave14305/master
Browse files Browse the repository at this point in the history
Fix dependencies in 386.14
  • Loading branch information
Adamm00 authored Jul 28, 2024
2 parents 63ab74e + ff98546 commit 801e90f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 56 deletions.
2 changes: 1 addition & 1 deletion firewall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# #
# Router Firewall And Security Enhancements #
# By Adamm - https://github.com/Adamm00/IPSet_ASUS #
# 26/07/2024 - v7.6.2 #
# 27/07/2024 - v7.6.3 #
#############################################################################################################


Expand Down
89 changes: 34 additions & 55 deletions webui/skynet.asp
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@
border-right: none !important;
}
</style>
<script language="JavaScript" type="text/javascript" src="/js/jquery.js"></script>
<script language="JavaScript" type="text/javascript" src="/js/httpApi.js"></script>
<script language="JavaScript" type="text/javascript" src="/client_function.js"></script>
<script language="JavaScript" type="text/javascript" src="/ext/skynet/chart.js"></script>
<script language="JavaScript" type="text/javascript" src="/ext/skynet/chartjs-plugin-zoom.js"></script>
<script language="JavaScript" type="text/javascript" src="/ext/skynet/hammerjs.js"></script>
<script language="JavaScript" type="text/javascript" src="/ext/skynet/stats.js"></script>
<script language="JavaScript" type="text/javascript" src="/js/jquery.js"></script>
<script language="JavaScript" type="text/javascript" src="/js/httpApi.js"></script>
<script language="JavaScript" type="text/javascript" src="/state.js"></script>
<script language="JavaScript" type="text/javascript" src="/client_function.js"></script>
<script language="JavaScript" type="text/javascript" src="/general.js"></script>
<script language="JavaScript" type="text/javascript" src="/popup.js"></script>
<script language="JavaScript" type="text/javascript" src="/help.js"></script>
Expand All @@ -103,7 +103,6 @@
<script language="JavaScript" type="text/javascript" src="/validator.js"></script>
<script>
var ChartInPortHits;
var $j = jQuery.noConflict();
Chart.defaults.global.defaultFontColor = "#CCC";
Chart.Tooltip.positioners.cursor = function(chartElements, coordinates) {
return coordinates;
Expand All @@ -128,8 +127,8 @@
var objchartname = window["Chart" + txtchartname];
var objdataname = GetDataDataset(txtchartname, multilabel);
var objlabeldataname;
var charttype = getChartType($j("#" + txtchartname + "_Type option:selected").val());
var chartcolour = getChartColour($j("#" + txtchartname + "_Colour option:selected").val());
var charttype = getChartType($("#" + txtchartname + "_Type option:selected").val());
var chartcolour = getChartColour($("#" + txtchartname + "_Colour option:selected").val());
if (typeof objdataname === 'undefined' || objdataname === null) {
Draw_Chart_NoData(txtchartname);
return;
Expand Down Expand Up @@ -248,7 +247,7 @@
urlprefix = "https://www.speedguide.net/port.php?port=";
} else if (txtchartname == "TCConnHits") {
return false;
} else if ($j("#" + txtchartname + "_Group option:selected").val() == 0) {
} else if ($("#" + txtchartname + "_Group option:selected").val() == 0) {
urlprefix = "https://otx.alienvault.com/indicator/ip/";
}
if (urlprefix != "") {
Expand Down Expand Up @@ -306,7 +305,7 @@
var s;
if ((s = cookie.get(cookiename)) != null) {
if (s.match(/^([0-2])$/)) {
$j("#" + cookiename).val(cookie.get(cookiename) * 1);
$("#" + cookiename).val(cookie.get(cookiename) * 1);
}
}
}
Expand All @@ -325,67 +324,49 @@
}
function SetCurrentPage() {
$j("#next_page").val(window.location.pathname.substring(1));
$j("#current_page").val(window.location.pathname.substring(1));
$("#next_page").val(window.location.pathname.substring(1));
$("#current_page").val(window.location.pathname.substring(1));
}
function AddEventHandlers() {
$j(".collapsible").click(function() {
if ($j(this).hasClass("expanded")) {
$j(this).removeClass("expanded").addClass("collapsed");
SetCookie($j(this).attr("id"), "collapsed");
$(".collapsible").click(function() {
if ($(this).hasClass("expanded")) {
$(this).removeClass("expanded").addClass("collapsed");
SetCookie($(this).attr("id"), "collapsed");
} else {
$j(this).removeClass("collapsed").addClass("expanded");
SetCookie($j(this).attr("id"), "expanded");
$(this).removeClass("collapsed").addClass("expanded");
SetCookie($(this).attr("id"), "expanded");
}
$j(this).siblings().toggle("fast");
$(this).siblings().toggle("fast");
});
$j(".default-collapsed").trigger("click");
$(".default-collapsed").trigger("click");
}
function SetExpanded() {
var coll = $j(".collapsible");
var coll = $(".collapsible");
var i;
for (i = 0; i < coll.length; i++) {
if (GetExpandedCookie(coll[i].id) == "collapsed") {
$j("#" + coll[i].id).trigger("click");
$("#" + coll[i].id).trigger("click");
}
}
}
/**-------------------------------------**/
/** Added by Martinski W. [2023-Jul-26] **/
/**-------------------------------------**/
resetOverflowCount = 0;
function ResetBodyStyleOverflow()
{
resetOverflowCount += 1;
let resetOverflowTimeout = (resetOverflowCount <= 10) ? 125 : 5000;
if (document.getElementById('TopDocBody').style.overflow != "auto")
{ document.getElementById('TopDocBody').style.overflow = "auto"; }
setTimeout(ResetBodyStyleOverflow, resetOverflowTimeout);
}
/**----------------------------------------**/
/** Modified by Martinski W. [2023-Jul-26] **/
/**----------------------------------------**/
function initial()
{
function initial() {
show_menu();
$j("#skynet_table_keystats").after(BuildChartHtml("Top 10 Blocked Devices (Outbound)", "TCConnHits", "false"));
$("#skynet_table_keystats").after(BuildChartHtml("Top 10 Blocked Devices (Outbound)", "TCConnHits", "false"));
$j("#skynet_table_keystats").after(BuildChartHtml("Top 10 Blocks (Outbound)", "TOConnHits", "true"));
$j("#skynet_table_keystats").after(BuildChartHtml("Top 10 Blocks (Inbound)", "TIConnHits", "true"));
$j("#skynet_table_keystats").after(BuildChartHtml("Top 10 HTTP(s) Blocks (Outbound)", "THConnHits", "true"));
$("#skynet_table_keystats").after(BuildChartHtml("Top 10 Blocks (Outbound)", "TOConnHits", "true"));
$("#skynet_table_keystats").after(BuildChartHtml("Top 10 Blocks (Inbound)", "TIConnHits", "true"));
$("#skynet_table_keystats").after(BuildChartHtml("Top 10 HTTP(s) Blocks (Outbound)", "THConnHits", "true"));
$j("#skynet_table_keystats").after(BuildTableHtml("Last 10 Unique HTTP(s) Blocks (Outbound)", "HTTPConn"));
$j("#skynet_table_keystats").after(BuildTableHtml("Last 10 Unique Connections Blocked (Outbound)", "OutConn"));
$j("#skynet_table_keystats").after(BuildTableHtml("Last 10 Unique Connections Blocked (Inbound)", "InConn"));
$("#skynet_table_keystats").after(BuildTableHtml("Last 10 Unique HTTP(s) Blocks (Outbound)", "HTTPConn"));
$("#skynet_table_keystats").after(BuildTableHtml("Last 10 Unique Connections Blocked (Outbound)", "OutConn"));
$("#skynet_table_keystats").after(BuildTableHtml("Last 10 Unique Connections Blocked (Inbound)", "InConn"));
$j("#skynet_table_keystats").after(BuildChartHtml("Top 10 Source Ports (Inbound)", "SPortHits", "false"));
$j("#skynet_table_keystats").after(BuildChartHtml("Top 10 Targeted Ports (Inbound)", "InPortHits", "false"));
$("#skynet_table_keystats").after(BuildChartHtml("Top 10 Source Ports (Inbound)", "SPortHits", "false"));
$("#skynet_table_keystats").after(BuildChartHtml("Top 10 Targeted Ports (Inbound)", "InPortHits", "false"));
var charts = ["InPortHits", "SPortHits", "TCConnHits"];
charts.forEach(ChartSetup, "false");
Expand All @@ -404,8 +385,6 @@
SetBLCount2();
SetHits1();
SetHits2();
setTimeout(ResetBodyStyleOverflow, 200);
}
Array.prototype.getDuplicates = function() {
Expand Down Expand Up @@ -547,7 +526,7 @@
function getAxisLabel(type, axis, txtchartname) {
var axislabel = "";
var value = $j("#" + txtchartname + "_Group option:selected").val();
var value = $("#" + txtchartname + "_Group option:selected").val();
if (axis == "x") {
if (type == "horizontalBar") axislabel = "Hits";
else if (type == "bar") {
Expand Down Expand Up @@ -581,7 +560,7 @@
function getChartLegendTitle(type, txtchartname) {
var chartlegendtitlelabel = "";
var value = $j("#" + txtchartname + "_Group option:selected").val();
var value = $("#" + txtchartname + "_Group option:selected").val();
if (txtchartname.indexOf("Port") != -1) {
chartlegendtitlelabel = "Port Number";
} else if (txtchartname == "TCConnHits") {
Expand All @@ -603,7 +582,7 @@
if (multilabel == "false") {
return window["Data" + txtchartname];
} else {
value = $j("#" + txtchartname + "_Group option:selected").val();
value = $("#" + txtchartname + "_Group option:selected").val();
if (value == 0) {
return window["Data" + txtchartname];
} else {
Expand All @@ -616,7 +595,7 @@
if (multilabel == "false") {
return window["Label" + txtchartname];
} else {
value = $j("#" + txtchartname + "_Group option:selected").val();
value = $("#" + txtchartname + "_Group option:selected").val();
if (value == 0) {
return window["Label" + txtchartname + "_IPs"];
} else {
Expand Down Expand Up @@ -827,7 +806,7 @@
</script>
</head>

<body onload="initial();" id="TopDocBody">
<body onload="initial();">
<div id="TopBanner"></div>
<div id="Loading" class="popup_bg"></div>
<iframe name="hidden_frame" id="hidden_frame" src="about:blank" width="0" height="0" frameborder="0"></iframe>
Expand Down

0 comments on commit 801e90f

Please sign in to comment.