Skip to content

Commit

Permalink
Restructured code
Browse files Browse the repository at this point in the history
  • Loading branch information
Arker123 committed Nov 9, 2023
1 parent 9405cb8 commit ba2f036
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions floss/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,16 +548,14 @@ def main(argv=None) -> int:

# set language configurations
lang_id: Language
if args.language == Language.GO.value:
lang_id = Language.GO
elif args.language == Language.RUST.value:
lang_id = Language.RUST
elif args.language == Language.DOTNET.value:
lang_id = Language.DOTNET
elif args.language == "none":
lang_id = Language.UNKNOWN
else:
lang_id = identify_language(sample, static_strings)
lang_id_mapping = {
Language.GO.value: Language.GO,
Language.RUST.value: Language.RUST,
Language.DOTNET.value: Language.DOTNET,
"none": Language.UNKNOWN,
}

lang_id = lang_id_mapping.get(args.language, identify_language(sample, static_strings))

if lang_id == Language.GO:
if analysis.enable_tight_strings or analysis.enable_stack_strings or analysis.enable_decoded_strings:
Expand Down

0 comments on commit ba2f036

Please sign in to comment.