File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -167,14 +167,14 @@ def __get_libc(self) -> Libc:
167167 def fortified (self ) -> FrozenSet [str ]:
168168 """Get the list of fortified symbols"""
169169 libc = self .__get_libc
170- return self .set_dyn_syms ^ libc .fortified_symbols
170+ return self .set_dyn_syms & libc .fortified_symbols
171171
172172 @property
173173 @lru_cache ()
174174 def fortifiable (self ) -> FrozenSet [str ]:
175175 """Get the list of fortifiable symbols (fortified + unfortified)"""
176176 libc = self .__get_libc
177- return self .set_dyn_syms ^ (self .fortified | libc .fortified_symbols_base )
177+ return self .set_dyn_syms & (self .fortified | libc .fortified_symbols_base )
178178
179179 @property
180180 def checksec_state (self ) -> ELFChecksecData :
@@ -188,7 +188,7 @@ def checksec_state(self) -> ELFChecksecData:
188188 # all fortified !
189189 score = 100
190190 else :
191- score = (fortified_count * 100 ) / ( fortified_count + fortifiable_count )
191+ score = (fortified_count * 100 ) / fortifiable_count
192192 score = round (score )
193193
194194 fortify_source = True if fortified_count != 0 else False
Original file line number Diff line number Diff line change 88
99setuptools .setup (
1010 name = "checksec.py" ,
11- version = "0.4.0 " ,
11+ version = "0.4.1 " ,
1212 author = "Mathieu Tarral" ,
13131414 description = "Checksec tool implemented in Python" ,
You can’t perform that action at this time.
0 commit comments