From 1403f547a60f57666d8c78a3921e7b45aa48eb52 Mon Sep 17 00:00:00 2001 From: Lisa Date: Wed, 12 Mar 2025 21:36:53 +0100 Subject: [PATCH] V1 release --- scanner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scanner.js b/scanner.js index ce6308d..8eb89e8 100644 --- a/scanner.js +++ b/scanner.js @@ -5,6 +5,7 @@ const axios = require('axios'); const patterns = JSON.parse(fs.readFileSync('patterns.json')).patterns; const aiprompt = "You are AI Code Scanner, your task is to analyze code given by user explain what it does with leaking nearly nothing from it and fully decide whats going on there and if it is malicious! Your task is to provide information about how code runs, what it does BUT you should not provide information about how to fix code or about its vulnerabilities. BUT You should provide information about related files and if the code is potentially dangerous/malicious. I repeat, don't provide information about Security and Potential Issues BUT provide infos if it might be illegal code, breaking some Terms of Service, abusing files eg creating tons of files or doing any other dangerous thing which may harm system." const pathtoscan = "./change/this" +const llamaendpoint = "http://0.0.0.0:11434/api/chat" function scanDirectory(directory) { fs.readdir(directory, (err, files) => { @@ -60,7 +61,7 @@ async function runAIScan(filePath) { console.error(`Error reading file: ${err}`); return; } - const apiUrl = 'http://192.168.2.109:11434/api/chat'; + const apiUrl = `${llamaendpoint}`; let input = { "model": "llama3.2:1b", "messages": [