File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 33
44from domaintools .cli .main import dt_cli
55from domaintools .cli .api import DTCLICommand
6- from domaintools .cli .utils import get_cli_helptext_by_name
6+ from domaintools .cli .utils import (
7+ get_cli_helptext_by_name ,
8+ remove_special_char_in_string ,
9+ )
710from domaintools .cli import constants as c
811
912
@@ -68,6 +71,12 @@ def iris_investigate(
6871
6972 extra_args = ctx .args .copy ()
7073 kwargs = DTCLICommand .args_to_dict (* extra_args )
74+ if "ssl_hash" in kwargs :
75+ # silently remove the ':' if present.
76+ ssl_hash_value = kwargs ["ssl_hash" ]
77+ kwargs ["ssl_hash" ] = remove_special_char_in_string (
78+ ssl_hash_value , special_char = ":"
79+ )
7180
7281 DTCLICommand .run (name = c .IRIS_INVESTIGATE , params = ctx .params , ** kwargs )
7382
Original file line number Diff line number Diff line change @@ -93,4 +93,21 @@ def get_file_extension(source: str) -> str:
9393 return ext
9494
9595
96- __all__ = ["get_cli_helptext_by_name" , "get_file_extension" ]
96+ def remove_special_char_in_string (item : str , special_char : str ) -> str :
97+ """Removes the given `special char` in an string item.
98+
99+ Args:
100+ item (str): The string to be formatted
101+
102+ Returns:
103+ str: The formatted string.
104+ """
105+ cleaned_string = item .replace (special_char , "" )
106+ return cleaned_string
107+
108+
109+ __all__ = [
110+ "get_cli_helptext_by_name" ,
111+ "get_file_extension" ,
112+ "remove_special_char_in_string" ,
113+ ]
You can’t perform that action at this time.
0 commit comments