Scanner/README.md

47 lines
1.5 KiB
Markdown
Raw Normal View History

2025-03-13 20:00:46 +01:00
# Scanner : V3
2025-03-12 21:33:47 +01:00
2025-03-12 21:38:54 +01:00
Node.JS based file scanner using patterns and OLLAMA (llama3.2:1b) integration for file/code analysis.
## Setup
Install axios
```js
2025-03-13 20:00:46 +01:00
npm i axios
2025-03-12 21:38:54 +01:00
```
2025-03-13 20:12:44 +01:00
Edit variables in code aiprompt, patterns, pathtoscan, llamaendpoint, etc.
2025-03-12 21:38:54 +01:00
Run code
```js
node scanner.js
```
2025-03-13 19:00:20 +01:00
If you want to quickly change path use:
```js
2025-03-13 20:15:02 +01:00
node scanner.js --pathtoscan="./your/path/goes/here"
2025-03-13 19:00:20 +01:00
```
2025-03-13 20:15:02 +01:00
## Extra Options
We have few extra options available.
1. `--pathtoscan="./your/path/goes/here"` | Scans specific path (can be set through code variable!)
2. `--ignorefolders="some,folder,to,ignore,and,not,scan"` | Ignores specific folder(s) in that path (CLI ONLY!)
3. `--ignorefiles="some,files,to,ignore,and,not,scan"` | Ignores specific file(s) in that path (CLI ONLY!)
2025-03-13 20:10:09 +01:00
## Known limitations
2025-03-13 19:00:20 +01:00
2025-03-13 20:10:09 +01:00
1. Discord webhook integration will send every file analysis which might appear few times per request of AI, it results in a ratelimit and no messages being sent or an error.
2. If OLLAMA is self hosted there is chance of it being overloaded, if it is being hosted externally and on paid plan there is chance of it eating a lot of money.
3. We do not recommend scanning nodemodules, cache files, etc. Please use --ignorefolders or --ignorefiles tag to exclude them.
2025-03-12 21:38:54 +01:00
2025-03-13 20:11:34 +01:00
## Known issues
1. Some OLLAMA models might refuse to analyse file for malware content.
2. Scanning too much files might result in huge console spam and AI/Discord integration errors.
2025-03-12 21:38:54 +01:00
COPYRIGHT CC-BY-SA-4.0, CONTACT: lisahonkay@gmail.com