MCPcopy
hub / github.com/jtesta/ssh-audit / get_ssh_timeframe

Method get_ssh_timeframe

src/ssh_audit/algorithms.py:97–109  ·  view source on GitHub ↗
(self, for_server: Optional[bool] = None)

Source from the content-addressed store, hash-verified

95 return maxlen
96
97 def get_ssh_timeframe(self, for_server: Optional[bool] = None) -> 'Timeframe':
98 timeframe = Timeframe()
99 for alg_pair in self.values:
100 alg_db = alg_pair.db
101 for alg_type, alg_list in alg_pair.items():
102 for alg_name in alg_list:
103 alg_name_native = Utils.to_text(alg_name)
104 alg_desc = alg_db[alg_type].get(alg_name_native)
105 if alg_desc is None:
106 continue
107 versions = alg_desc[0]
108 timeframe.update(versions, for_server)
109 return timeframe
110
111 def get_recommendations(self, software: Optional['Software'], for_server: bool = True) -> Tuple[Optional['Software'], Dict[int, Dict[str, Dict[str, Dict[str, int]]]]]:
112 # pylint: disable=too-many-locals,too-many-statements

Callers 1

output_compatibilityFunction · 0.80

Calls 4

updateMethod · 0.95
TimeframeClass · 0.90
itemsMethod · 0.80
to_textMethod · 0.80

Tested by

no test coverage detected