Prechádzať zdrojové kódy

Tidied up 'Defang IP Addresses' operation

n1474335 5 rokov pred
rodič
commit
43472394c7

+ 1 - 1
src/core/config/Categories.json

@@ -180,7 +180,7 @@
             "Encode NetBIOS Name",
             "Encode NetBIOS Name",
             "Decode NetBIOS Name",
             "Decode NetBIOS Name",
             "Defang URL",
             "Defang URL",
-            "Defang IP"
+            "Defang IP Addresses"
         ]
         ]
     },
     },
     {
     {

+ 6 - 9
src/core/operations/DefangIP.mjs → src/core/operations/DefangIPAddresses.mjs

@@ -8,19 +8,19 @@ import Operation from "../Operation";
 
 
 
 
 /**
 /**
- * Defang IP operation
+ * Defang IP Addresses operation
  */
  */
-class DefangIP extends Operation {
+class DefangIPAddresses extends Operation {
 
 
     /**
     /**
-     * DefangIP constructor
+     * DefangIPAddresses constructor
      */
      */
     constructor() {
     constructor() {
         super();
         super();
 
 
-        this.name = "Defang IP";
+        this.name = "Defang IP Addresses";
         this.module = "Default";
         this.module = "Default";
-        this.description = "Takes a IPV4 or IPV6 address and 'Defangs' it; meaning the IP becomes invalid, removing the risk of accidentally utilising it as an IP address.";
+        this.description = "Takes a IPv4 or IPv6 address and 'Defangs' it, meaning the IP becomes invalid, removing the risk of accidentally utilising it as an IP address.";
         this.infoURL = "https://isc.sans.edu/forums/diary/Defang+all+the+things/22744/";
         this.infoURL = "https://isc.sans.edu/forums/diary/Defang+all+the+things/22744/";
         this.inputType = "string";
         this.inputType = "string";
         this.outputType = "string";
         this.outputType = "string";
@@ -34,13 +34,10 @@ class DefangIP extends Operation {
      * @returns {string}
      * @returns {string}
      */
      */
     run(input, args) {
     run(input, args) {
-
-
         input = input.replace(IPV4_REGEX, x => {
         input = input.replace(IPV4_REGEX, x => {
             return x.replace(/\./g, "[.]");
             return x.replace(/\./g, "[.]");
         });
         });
 
 
-
         input = input.replace(IPV6_REGEX, x => {
         input = input.replace(IPV6_REGEX, x => {
             return x.replace(/:/g, "[:]");
             return x.replace(/:/g, "[:]");
         });
         });
@@ -49,7 +46,7 @@ class DefangIP extends Operation {
     }
     }
 }
 }
 
 
-export default DefangIP;
+export default DefangIPAddresses;
 
 
 
 
 /**
 /**