From 6f3f39a0313caa95ef0688ae11c806582fb281f6 Mon Sep 17 00:00:00 2001 From: Micah Babinski Date: Fri, 21 Jan 2022 13:52:51 -0800 Subject: [PATCH] Added 'ignore private IP' feature, and updated readme file with usage and screenshots. --- DefangText.py => Defanger.py | 4 ++-- Images/AfterDefang.PNG | Bin 0 -> 11528 bytes Images/BeforeDefang.PNG | Bin 0 -> 11166 bytes README.md | 15 ++++++++++++++- 4 files changed, 16 insertions(+), 3 deletions(-) rename DefangText.py => Defanger.py (96%) create mode 100644 Images/AfterDefang.PNG create mode 100644 Images/BeforeDefang.PNG diff --git a/DefangText.py b/Defanger.py similarity index 96% rename from DefangText.py rename to Defanger.py index 14e8435..81fb226 100644 --- a/DefangText.py +++ b/Defanger.py @@ -16,13 +16,13 @@ # function to defang input text def Defang(inputText, ignorePrivate=True): - url_candidates = [x[0] for x in re.findall(r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))", inputText)] + url_candidates = [x[0] for x in re.findall(r"(?i)\b((?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?]))", inputText)] if len(url_candidates) > 0: for url in url_candidates: inputText = inputText.replace(url, url.replace(".", "[.]")) inputText = inputText.replace("http:", "hxxp:").replace("https:", "hxxps:") - ftp_candidates = [x[0] for x in re.findall(r"(?i)\b((?:ftp?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?«»“”‘’]))", inputText)] + ftp_candidates = [x[0] for x in re.findall(r"(?i)\b((?:ftp?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'\".,<>?]))", inputText)] if len(ftp_candidates) > 0: for ftp in ftp_candidates: inputText = inputText.replace(ftp, ftp.replace(".", "[.]")) diff --git a/Images/AfterDefang.PNG b/Images/AfterDefang.PNG new file mode 100644 index 0000000000000000000000000000000000000000..7b500f785441a4f4d14b35206e6bd35e86bad6d1 GIT binary patch literal 11528 zcmeHt2~?Bkx^9r8v<^^5q$08GEs9JE3MxZt%TO5wl_@}+0z^nakVzn+bt~WiwL&6; zM5SRU0s#V!(U8`9u$v=Gm zH@xrjJn#E`-=BNR*JIQA&)0)MpiL*gaSZ^0)*yke!zb&2E3ZvrZGbWW~qE7gn0D&6vH>{pt3!Hx%|4m3D2&CVo{p$3@Rb2vsEFYe9J#i*ALdc`VIGsm> zs|tvs_j4OwcgA)^JrrajHOvwV(~b>N>tJBRBX0LgQNmFs$-8jC$R1n0 zjHEj?7Y0ae)B@W2+gv7*eeEB z@t)2}-%fh_h9H!o#WMFBLb8Sp6Qku_V3B$judW7~X=d6NsjspN>!Mr7;zJeJPQB%@ zUu@bi++a*~DloMVL!l_SY@W`SaOM3?a|& z+4nNGfruQo1}#M5!Z=TUkVd=|0wb(2ch@Y_RQ{B$7$IA|EV5C*wP`aq@~{3}efFJN zIxBefIzeCwg+1qVzVW*~1Sut5O}pBq?GE5R(iz5Bc}qtdQS}C42b%&>=h zdl8;`JI=Jg!a279;LKann&D7HIU9H`piD;D+-kXJ8&$hMR5VKE_`}D+SS+}=rZ}=f# zc*T{a?8A|=Uua%s(|*y@oQ}hYak^j1AVTTzGh5X}g>q#AMN}_d5x`{!<*-$srRDzq zuN`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fP6paflUBdz#QyHIfb>K2?@qBKtKS~|8wCD2@3g#n g6~!1x(SRK)>c@BHaLs|Ymq91pd|m6lI``fG0)Kk4ApigX literal 0 HcmV?d00001 diff --git a/Images/BeforeDefang.PNG b/Images/BeforeDefang.PNG new file mode 100644 index 0000000000000000000000000000000000000000..28fd1b8b8ae264bc51e828754a896b4bb8c062a8 GIT binary patch literal 11166 zcmeHtYgkj)wsx$$(pr$ZtyMrstyWqQu&5x{)U84hgTG!tU1RT zYmV{0W2~{}cb|oa*sXM234_7xLOz8GxukkRf0m)Y2>BbVv2TMC z8vG?;&!IgqSQFtb^H;A!<2N%tJ&uOKR&kep%XsOxPs3ntJ3{yEIh-4#mU2>30le(& zu8kj6bKV2@JUe-G^9dWD@bZUFsc{M1Z!R{ST>kZiLyDl=Yj3V<%_Kj&E%ov!UWo~o zwCz}LyG;J1ri%X)`b?kid=O%|e_~U~LhgeyR=?SAN2JW3S}kC;8x4GbUA8&2f4tEd zG8`8Z>;!x8`gSo4=5bE20+z9?*c*24t&_B6u&8s*rE~;1kC0i$WfrLv)Ehk8`7l_< zssslVpu+$RlN@1{OMBC;OetvKfay9UXAvp=2nMU-9uJnN)hPdG2f$ftyiN`WTm4^$ zokQo&CpxX71Ew-iT1uCJ7MaYVmRV7lRj_l|$jC^dF}3?+iy{_UBDj+&_9d7Ok=1bP zC_IN_AcAb?RB#Mo{@njL-o!EUrLQiGADgE!oy=#hrn$tl3y%g!)t>12pC!3(!baAJ zy;A8_6uMWp^)bgBIhuj=Q@0H76yuFTl1ogyoBbIF6ld0n^FwZVLouBwJxj^nq|w|l z<@Q-|^$E*iL98%m)c&1)!*M^arMjRv#zATh$ErfCx1;yN&7JV9@#m-f#Ezc!OkzEA z?CJ-d3fQ^JSzY9Y^`$hOW9sAj5Q!&#_HtR|i!{7hhT+WnbA;7#mlJWUDVMYr)Y_I! zjev<(+@=|9ZM3QfC`|cyDRm%Q1pdk@_uCDmWJrDN?d5U4ZPHUf0S4ov9*3P{xba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xq+^b2 z=a;HVmDDo7V7`*&00jX%oUdc5&fJy;l_D@Qd@3!peQN2kZd%+@$(`Qa5NEttnij0C zPh~K96Eu2PqAI3bB?}HLWz9Oi|z@QquKv*-hP&^Yw>@V1`!~MLawBT3H@HX8T1R5QpC_w(sy!?f%tL39~;4uoor+;_A z_)A5w#1k;|l=0mQh9OO}hh*JVCX6_E+zH@_NAGht`mkcs2?y>Di4%#dXcJ512-WcZ zE%CI)O(^5+&R2e`K4F4tvCoi>sUQ447SF9)O}C|ASwhT0I8?fje*pkK;jRDx literal 0 HcmV?d00001 diff --git a/README.md b/README.md index 91fbb3f..bd26e08 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,17 @@ # Defanger A GUI application to defang text, rendering otherwise-potentially malicious IP addresses and URLs harmless. Built using standard Python libraries. -Don't get too excited. It's notepad with a "Defang Text" button. +## Usage + +Simply run the Defanger.py script (requires Python 3) to be presented with the GUI. You can then enter or paste the text you wish to defang. + +By default, defanger will ignore (not defang) private IP addresses, although you can uncheck this option to defang all IP addresses. + +Once you have defanged the input text, you can copy it to the clipboard, clear the defanger, or close using the buttons at the bottom. + +## Example +Before defanging: +![alt text](https://github.com/mbabinski/Defanger/blob/main/Images/BeforeDefang.PNG?raw=true) + +After defanging: +![alt text](https://github.com/mbabinski/Defanger/blob/main/Images/AfterDefang.PNG?raw=true) \ No newline at end of file