This repository has been archived on 2025-04-28. You can view files and clone it, but cannot push or open issues or pull requests.
gensec-westgate-djw2/hw4/README.md
2024-05-09 22:14:42 -07:00

45 lines
1.4 KiB
Markdown

###### David Westgate 10 May 2024
## HW4 for gensec
This application is a Langchain agent which intends to be helpful at de-obfuscating and de-minifying javascript code. On the web, minifying javascript code is common to minimize javascript source file size before they are sent over the network to the client. Obsfuscating is also used to limit the ability to reverse engineer the function of javascript running on the client from enterprise web applications. The application is programmed to ingest javascript source files both from the local machine, as well as from URLs.
### Setup + Run
Install python3, then
```
cd hw4
pip install -r requirnments.txt
cp .env.example .env #fill in env file with key
python3 app.py
```
### Running
```
python3 app.py
```
### Example Input
Test the ability to ingest a web source (not minified or obfuscated)
```
https://gitlab.com/djw2/web-monitor/-/raw/master/server/server.js
```
Test the ability to de-obfuscate a local javascript source
```
test/obsfu/test-obsfu.js
```
Test the ability to de-minify a local javascript source
```
test/min/test-minified.js
```
Test the ability to identify non-javascript source file locally, ineligable for de-obfuscation
```
test/lorem.txt
```
### Links
[Automated Minifier](https://www.toptal.com/developers/javascript-minifier)
[Automater Obsfuscator](https://obfuscator.io/)
[Automated Beautifier](https://beautifier.io/)