ptrstream

- Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.acid.vegas/-c.git
Log | Files | Refs | Archive | README

commit 1ea867e1cbcf1630b82159c8584c32cb3934be59
parent a0ae406fb9ba38771fb1e901abc75ba609856b0a
Author: acidvegas <acid.vegas@acid.vegas>
Date: Thu, 23 Nov 2023 05:11:37 -0500

file output fixed (no more ansi in output)

Diffstat:
Mptrstream.py | 16++++++++--------

1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/ptrstream.py b/ptrstream.py
@@ -89,18 +89,18 @@ async def main():
 					elif ip in result:
 						result = result.replace(ip, f'{colors.ip_match}{ip}{colors.ptr}')
 					elif (daship := ip.replace('.', '-')) in result:
-						result = result.replace(daship, f'{colors.ip_match}{daship}{colors.ptr}')
-						print(f'{colors.ip}{ip.ljust(15)}{colors.reset} {colors.separator}->{colors.reset} {colors.ptr}{result}{colors.reset}')
+						change = result.replace(daship, f'{colors.ip_match}{daship}{colors.ptr}')
+						print(f'{colors.ip}{ip.ljust(15)}{colors.reset} {colors.separator}->{colors.reset} {colors.ptr}{change}{colors.reset}')
 					elif (revip := '.'.join(ip.split('.')[::-1])) in result:
-						result = result.replace(revip, f'{colors.ip_match}{revip}{colors.ptr}')
-						print(f'{colors.ip}{ip.ljust(15)}{colors.reset} {colors.separator}->{colors.reset} {colors.ptr}{result}{colors.reset}')
+						change = result.replace(revip, f'{colors.ip_match}{revip}{colors.ptr}')
+						print(f'{colors.ip}{ip.ljust(15)}{colors.reset} {colors.separator}->{colors.reset} {colors.ptr}{change}{colors.reset}')
 					elif result.endswith('.gov') or result.endswith('.mil'):
-						result = result.replace('.gov', f'{colors.spooky}.gov{colors.reset}')
-						result = result.replace('.mil', f'{colors.spooky}.mil{colors.reset}')
+						change = result.replace('.gov', f'{colors.spooky}.gov{colors.reset}')
+						change = change.replace('.mil', f'{colors.spooky}.mil{colors.reset}')
 						print(f'{colors.ip}{ip.ljust(15)}{colors.reset} {colors.separator}->{colors.reset} {colors.ptr}{result}{colors.reset}')
 					elif '.gov.' in result or '.mil.' in result:
-						result = result.replace('.gov.', f'{colors.spooky}.gov.{colors.ptr}')
-						result = result.replace('.mil.', f'{colors.spooky}.mil.{colors.ptr}')
+						change = result.replace('.gov.', f'{colors.spooky}.gov.{colors.ptr}')
+						change = change.replace('.mil.', f'{colors.spooky}.mil.{colors.ptr}')
 						print(f'{colors.ip}{ip.ljust(15)}{colors.reset} {colors.separator}->{colors.reset} {colors.ptr}{result}{colors.reset}')
 					else:
 						print(f'{colors.ip}{ip.ljust(15)}{colors.reset} {colors.separator}->{colors.reset} {colors.ptr}{result}{colors.reset}')