diff --git a/Protest/Front/deviceview.js b/Protest/Front/deviceview.js index 6f5b553f..00a3d255 100644 --- a/Protest/Front/deviceview.js +++ b/Protest/Front/deviceview.js @@ -2642,26 +2642,16 @@ class DeviceView extends View { const snmpInput = document.createElement("select"); snmpInput.style.marginLeft = "0"; - snmpInput.style.width = "160px"; + snmpInput.style.width = "200px"; snmpInput.style.gridArea = "3 / 3"; snmpInput.disabled = true; grid.appendChild(snmpInput); - const ver2Option = document.createElement("option"); - ver2Option.value = "2"; - ver2Option.text = "Version 2"; - snmpInput.appendChild(ver2Option); - - const ver3Option = document.createElement("option"); - ver3Option.value = "3"; - ver3Option.text = "Version 3"; - snmpInput.appendChild(ver3Option); - - snmpInput.value = "3"; + //TODO: implement SNMP const portScanInput = document.createElement("select"); portScanInput.style.marginLeft = "0"; - portScanInput.style.width = "160px"; + portScanInput.style.width = "200px"; portScanInput.style.gridArea = "5 / 3"; grid.appendChild(portScanInput); @@ -2681,21 +2671,11 @@ class DeviceView extends View { portScanInput.appendChild(extendedOption); snmpToggle.checkbox.onchange = ()=> { - if (snmpToggle.checkbox.checked) { - snmpInput.disabled = false; - } - else { - snmpInput.disabled = true; - } + snmpInput.disabled = !snmpToggle.checkbox.checked; }; portScanToggle.checkbox.onchange = ()=> { - if (portScanToggle.checkbox.checked) { - portScanInput.disabled = false; - } - else { - portScanInput.disabled = true; - } + portScanInput.disabled = !portScanToggle.checkbox.checked; }; dialog.okButton.onclick = async ()=> { diff --git a/Protest/Front/list.js b/Protest/Front/list.js index dc422076..3eb31d50 100644 --- a/Protest/Front/list.js +++ b/Protest/Front/list.js @@ -575,7 +575,15 @@ class List extends Window { if (!(this.columnsElements[i].textContent in entry)) continue; const newAttr = document.createElement("div"); - newAttr.textContent = entry[this.columnsElements[i].textContent].v; + let value = entry[this.columnsElements[i].textContent].v; + if (value.length > 0) { + newAttr.textContent = value; + } + else { + newAttr.textContent = "empty"; + newAttr.style.color = "#666"; + newAttr.style.fontStyle = "italic"; + } element.appendChild(newAttr); if (i === 0) { diff --git a/Protest/Front/passwordgen.js b/Protest/Front/passwordgen.js index 12709942..46f08766 100644 --- a/Protest/Front/passwordgen.js +++ b/Protest/Front/passwordgen.js @@ -179,7 +179,8 @@ class PassGen extends Window { stampButton.type = "button"; buttonsBox.appendChild(stampButton); - generateButton.style.width = copyButton.style.width = "96px"; + copyButton.style.width = "72px"; + generateButton.style.width = "96px"; generateButton.style.height = copyButton.style.height = stampButton.style.height = "40px"; generateButton.style.margin = copyButton.style.margin = stampButton.style.margin = "2px"; @@ -307,6 +308,7 @@ class PassGen extends Window { this.Strength(); }; + this.cmbOptions.onchange(); this.Generate(); this.LoadWords(); diff --git a/Protest/Front/ui.js b/Protest/Front/ui.js index 59b87da2..7d620e5c 100644 --- a/Protest/Front/ui.js +++ b/Protest/Front/ui.js @@ -325,7 +325,7 @@ const MENU = { //{ t:"RS-232", i:"mono/serialconsole.svg?light", g:"utilities", h:true, f:()=>{}, k:"rs 232 serial terminal console" }, { t:"Encoder", i:"mono/encoder.svg?light", g:"utilities", h:true, f:args=> new Encoder(args), k:"binary hex base64 url html decode" }, { t:"Network calculator", i:"mono/netcalc.svg?light", g:"utilities", h:true, f:args=> new NetCalc(args), k:"subnet" }, - { t:"Password generator", i:"mono/passgen.svg?light", g:"utilities", h:false, f:args=> new PassGen(args), k:"code" }, + { t:"Password generator", i:"mono/passgen.svg?light", g:"utilities", h:false, f:()=> new PassGen(), k:"code" }, { t:"Screen capture", i:"mono/screenrecord.svg?light", g:"utilities", h:true, f:args=> new ScreenCapture(), k:"recorder shot" }, { t:"Camera tester", i:"mono/webcam.svg?light", g:"utilities", h:true, f:args=> new CameraTester(), k:"webcam" }, { t:"Microphone tester", i:"mono/mic.svg?light", g:"utilities", h:true, f:args=> new MicTester(), k:"audio input" }, diff --git a/Protest/Protocols/Snmp.Polling.cs b/Protest/Protocols/Snmp.Polling.cs index 2558128a..2e42c3d0 100644 --- a/Protest/Protocols/Snmp.Polling.cs +++ b/Protest/Protocols/Snmp.Polling.cs @@ -1,16 +1,11 @@ -using Lextm.SharpSnmpLib; -using Lextm.SharpSnmpLib.Messaging; -using Lextm.SharpSnmpLib.Security; -using System; +using System; using System.Collections.Generic; -using System.Diagnostics.Contracts; using System.IO; -using System.Linq; using System.Net; -using System.Reflection.Metadata; -using System.Security.Cryptography; using System.Text; -using System.Threading; +using Lextm.SharpSnmpLib; +using Lextm.SharpSnmpLib.Messaging; +using Lextm.SharpSnmpLib.Security; namespace Protest.Protocols.Snmp;