diff --git a/Boop/Boop/scripts/URLDefang.js b/Boop/Boop/scripts/URLDefang.js new file mode 100644 index 00000000..2bde9559 --- /dev/null +++ b/Boop/Boop/scripts/URLDefang.js @@ -0,0 +1,18 @@ +/** + { + "api":1, + "name":"Defang", + "description":"Defangs dangerous URLs and other IOCs", + "author":"Ross", + "icon":"link", + "tags":"defang,url,ioc" + } +**/ + +function main(input) { + url = input.text; + url = url.replace(/\./g, "[.]"); + url = url.replace(/http/gi, "hXXp"); + url = url.replace(/:\/\//g, "[://]"); + input.text = url; +} \ No newline at end of file diff --git a/Boop/Boop/scripts/URLRefang.js b/Boop/Boop/scripts/URLRefang.js new file mode 100644 index 00000000..9a2fa37a --- /dev/null +++ b/Boop/Boop/scripts/URLRefang.js @@ -0,0 +1,18 @@ +/** + { + "api":1, + "name":"Refang", + "description":"Removes defanging from dangerous URLs and other IOCs", + "author":"Ross", + "icon":"link", + "tags":"refang,url,ioc" + } +**/ + +function main(input) { + url = input.text; + url = url.replace(/\[\.\]/g, "."); + url = url.replace(/hXXp/gi, "http"); + url = url.replace(/\[:\/\/\]/g, "://"); + input.text = url; +} \ No newline at end of file