Exploit databaseDownload repository ZIP
GH-05b70bdc2d4d67fdc4f941bfebd2d88c
joelindra/cve-2017-9841
Sources for CVE-2017-9841
17 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files1
joelindra/cve-2017-9841Revision 2688bc90fcb5
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
scripts/aetheris-audit.js
JavaScript · 2,886 bytesconst fs = require('fs');
const path = require('path');
const API_KEY = process.env.SUMOPOD_API_KEY;
if (!API_KEY) {
console.error("Error: SUMOPOD_API_KEY is not defined in environments.");
process.exit(1);
}
const filesToScan = process.argv.slice(2);
const allowedExtensions = ['.py', '.js', '.ts', '.tsx'];
if (filesToScan.length === 0) {
console.log("No modified files detected to scan. Skipping CI/CE audit.");
process.exit(0);
}
const targetFiles = filesToScan
.map(f => f.trim())
.filter(f => {
const ext = path.extname(f);
return allowedExtensions.includes(ext) && fs.existsSync(f);
});
if (targetFiles.length === 0) {
console.log("No matching source code files were modified. Skipping CI/CE audit.");
process.exit(0);
}
async function auditFile(filePath) {
const content = fs.readFileSync(filePath, 'utf-8');
console.log(`Auditing file: ${filePath}...\n`);
const response = await fetch('https://ai.sumopod.com/v1/chat/completions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`
},
body: JSON.stringify({
model: 'qwen3.6-flash',
messages: [
{
role: 'system',
content: `You are an automated Aetheris CI/CE security audit runner. You will analyze the provided source code file: ${filePath}.
Generate a clear markdown report focusing on:
1. Business Logic Flaws & Vulnerabilities (OS Command Injections, SSRF, Input validation bypasses, Auth problems).
2. Code Optimizations & Refactor Candidate Diffs.
3. Logical risk scoring.
Be direct, factual, and do not use generic explanations.`
},
{ role: 'user', content: content }
],
temperature: 0.2
})
});
if (!response.ok) {
throw new Error(`API Gateway returned status ${response.status} for file ${filePath}`);
}
const data = await response.json();
return data.choices[0].message.content;
}
async function runMasterAudit() {
let masterReport = `# Aetheris CI/CE Automation Audit Report\\n\\n`;
masterReport += `*Execution Time: ${new Date().toUTCString()}*\\n`;
masterReport += `*Audited Files:* ${targetFiles.map(f => '\`' + f + '\`').join(', ')}\\n\\n---\\n\\n`;
for (const filePath of targetFiles) {
masterReport += `## File Scan: \`${filePath}\`\\n\\n`;
try {
const report = await auditFile(filePath);
masterReport += `${report}\\n\\n---\\n\\n`;
} catch (err) {
console.error(`Failed to audit ${filePath}:`, err.message);
masterReport += `> ❌ **Failed to audit file:** ${err.message}\\n\\n---\\n\\n`;
}
}
fs.writeFileSync('aetheris-report.md', masterReport);
console.log("Master report successfully generated and saved to: aetheris-report.md");
}
runMasterAudit().catch(err => {
console.error("Master audit failure:", err);
process.exit(1);
});