yoeo / guesslang

Detect the programming language of a source code
https://guesslang.readthedocs.io
MIT License
772 stars 110 forks source link

Feauture request: Powershell & Windows batch files #2

Closed yarox24 closed 4 years ago

yoeo commented 6 years ago

Hi @yarox24

If the installation goes well, the Windows batch files should be generated. Unfortunately I didn't test guesslang on Windows platform yet.

There should be no platform dependent code in the project so it will try to test & port it to Windows.

I'll keep you in touch. Thank you.

yarox24 commented 6 years ago

Hi @yoeo In initial request I mean support for language detection for 2 new languages: PowerShell, Windows BatchScript. But Windows support as feature will also be good :)

I’m now trying to learn the new model with following languages added: "Batchfile" : ["bat"], "PowerShell": ["ps1"],

I changed this line to suppress some errors (unzip_repos.py): try: zipped_repo, filename = zipped_file.split('::') except: # BETTER SHOULD BE StandardException print("EXCEPTION") continue

The goal is to use guesslang to carving for PowerShell/Bat Scripts in unallocated space of HDD ;) [Digital Forensics]

yoeo commented 6 years ago

I never thought about such a use case, that's a nice idea :-) I'll work on that, I might take some time fine tune the model but it's worth the try.

By the way I will deal with the unzip_repos.py exception here https://github.com/yoeo/guesslang/issues/5

Thanks.

yoeo commented 4 years ago

Hello @yarox24

Guesslang now supports 30 languages, including Batchfiles and Powershell.

Thanks.