yo a este lo conozco

This commit is contained in:
Kevin Muñoz 2024-09-07 13:18:02 -05:00
parent aa1317ce11
commit f40bd4e2ca
Signed by: mrhacker
GPG Key ID: E5616555DD4EDAAE
5 changed files with 477 additions and 295 deletions

6
.env.example Normal file
View File

@ -0,0 +1,6 @@
DB_HOST=
DB_USER=
DB_PASSWD=
DB_NAME=
DB_CHARSET=utf8mb4
DB_COALLITION=utf8mb4_general_ci

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/templates/upload.html
app.py~
app2.py
.env

142
app.py
View File

@ -1,13 +1,81 @@
from flask import Flask, render_template, request, jsonify
from flask_socketio import SocketIO, emit
from dotenv import load_dotenv
import subprocess
import uuid
import os
import requests
import hashlib
import mysql.connector
import filetype
app = Flask(__name__)
socketio = SocketIO(app)
def get_file_hashes(file_path):
hash_md5 = hashlib.md5()
hash_sha1 = hashlib.sha1()
hash_sha256 = hashlib.sha256()
with open(file_path, "rb") as f:
for chunk in iter(lambda: f.read(4096), b""):
hash_md5.update(chunk)
hash_sha1.update(chunk)
hash_sha256.update(chunk)
return {
"md5": hash_md5.hexdigest(),
"sha1": hash_sha1.hexdigest(),
"sha256": hash_sha256.hexdigest()
}
def get_file_type(file_path):
kind = filetype.guess(file_path)
if kind is None:
return "Unknown"
return kind.mime
def check_file_in_db(hashes):
connection = mysql.connector.connect(
host=os.getenv('DB_HOST'),
user=os.getenv('DB_USER'),
password=os.getenv('DB_PASSWD'),
database=os.getenv('DB_NAME'),
charset=os.getenv('DB_CHARSET'),
collation=os.getenv('DB_COALLITION')
)
cursor = connection.cursor()
query = "SELECT scan_result FROM file_scans WHERE md5_hash = %s OR sha1_hash = %s OR sha256_hash = %s"
cursor.execute(query, (hashes["md5"], hashes["sha1"], hashes["sha256"]))
result = cursor.fetchone()
cursor.close()
connection.close()
return result
def store_file_in_db(filename, hashes, file_type, scan_result):
connection = mysql.connector.connect(
host=os.getenv('DB_HOST'),
user=os.getenv('DB_USER'),
password=os.getenv('DB_PASSWD'),
database=os.getenv('DB_NAME'),
charset=os.getenv('DB_CHARSET'),
collation=os.getenv('DB_COALLITION')
)
cursor = connection.cursor()
query = """
INSERT INTO file_scans (filename, md5_hash, sha1_hash, sha256_hash, file_type, scan_result)
VALUES (%s, %s, %s, %s, %s, %s)
"""
cursor.execute(query, (filename, hashes["md5"], hashes["sha1"], hashes["sha256"], file_type, scan_result))
connection.commit()
cursor.close()
connection.close()
@app.route('/', methods=['GET', 'POST'])
def index():
return render_template('index.html')
@ -19,11 +87,26 @@ def upload_file():
file_path = os.path.join('/tmp', f"{uuid.uuid4()}_{file.filename}")
file.save(file_path)
# Ejecuta el escaneo en un hilo separado para no bloquear la aplicación
socketio.start_background_task(target=scan_file, file_path=file_path)
# Obtener los hashes y el tipo de archivo
hashes = get_file_hashes(file_path)
file_type = get_file_type(file_path)
return 'Archivo subido exitosamente: ' + file.filename
return 'No se recibió ningún archivo', 400
# Verificar si el archivo ya fue escaneado
existing_result = check_file_in_db(hashes)
if existing_result:
os.remove(file_path)
# Formatear el resultado del escaneo para que sea más legible
scan_result = format_scan_result(existing_result[0])
return jsonify({
'message': 'Este archivo ya lo he visto antes.',
'scan_result': scan_result
})
# Ejecuta el escaneo en un hilo separado para no bloquear la aplicación
socketio.start_background_task(target=scan_file, file_path=file_path, hashes=hashes, file_type=file_type, filename=file.filename)
return jsonify({'message': 'Archivo subido exitosamente: ' + file.filename})
return jsonify({'error': 'No se recibió ningún archivo'}), 400
@app.route('/scan_url', methods=['POST'])
def scan_url():
@ -45,32 +128,63 @@ def scan_url():
with open(file_path, 'wb') as temp_file:
temp_file.write(response.content)
# Ejecutar el escaneo en un hilo separado para no bloquear la aplicación
socketio.start_background_task(target=scan_file, file_path=file_path)
# Obtener los hashes y el tipo de archivo
hashes = get_file_hashes(file_path)
file_type = get_file_type(file_path)
return jsonify({'message': f'Archivo descargado y guardado como {file_path}'}), 200
# Verificar si el archivo ya fue escaneado
existing_result = check_file_in_db(hashes)
if existing_result:
os.remove(file_path)
# Formatear el resultado del escaneo para que sea más legible
scan_result = format_scan_result(existing_result[0])
return jsonify({
'message': 'Este archivo ya lo he visto antes.',
'scan_result': scan_result
})
# Ejecutar el escaneo en un hilo separado para no bloquear la aplicación
socketio.start_background_task(target=scan_file, file_path=file_path, hashes=hashes, file_type=file_type, filename=filename)
return jsonify({'message': f'Archivo descargado y guardado como {file_path}. El escaneo está en progreso.'}), 200
except Exception as e:
return jsonify({'error': str(e)}), 500
def scan_file(file_path):
def scan_file(file_path, hashes, file_type, filename):
try:
# Ejecuta el comando de escaneo
scan_command = ["clamscan", "-r", file_path]
process = subprocess.Popen(scan_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
for line in iter(process.stdout.readline, ''):
if line.strip():
socketio.emit('scan_output', {'data': line.strip()})
# Lee la salida y los errores usando communicate()
scan_output, error_output = process.communicate()
# Verificar el código de retorno del proceso
if process.returncode != 0:
socketio.emit('scan_output', {'data': f'Error en el escaneo: {error_output}'})
return
# Si no hubo errores, emitir la salida del escaneo
socketio.emit('scan_output', {'data': scan_output})
# Emitir mensaje de escaneo completo
socketio.emit('scan_output', {'data': '--- Escaneo completado ---'})
process.stdout.close()
process.stderr.close()
process.wait()
# Almacenar los hashes, el tipo de archivo y el resultado del escaneo en la base de datos
store_file_in_db(filename, hashes, file_type, scan_output)
except Exception as e:
socketio.emit('scan_output', {'data': f'Error: {str(e)}'})
finally:
# Asegúrate de eliminar el archivo temporal después del escaneo
if os.path.exists(file_path):
os.remove(file_path)
def format_scan_result(scan_result):
# Formatear el resultado del escaneo para mejor legibilidad
formatted_result = scan_result.replace("\n", "<br>")
return formatted_result
if __name__ == '__main__':
socketio.run(app, debug=True)

View File

@ -1,21 +1,24 @@
bidict
blinker
certifi
charset-normalizer
clamd
click
Flask
Flask-SocketIO
h11
idna
itsdangerous
Jinja2
MarkupSafe
pyClamd
python-engineio
python-socketio
requests
simple-websocket
urllib3
Werkzeug
wsproto
bidict==0.23.1
blinker==1.8.2
certifi==2024.7.4
charset-normalizer==3.3.2
clamd==1.0.2
click==8.1.7
filetype==1.2.0
Flask==3.0.3
Flask-SocketIO==5.3.6
h11==0.14.0
idna==3.7
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==2.1.5
mysql-connector-python==9.0.0
pyClamd==0.4.0
python-dotenv==1.0.1
python-engineio==4.9.1
python-socketio==5.11.3
requests==2.32.3
simple-websocket==1.0.0
urllib3==2.2.2
Werkzeug==3.0.3
wsproto==1.2.0

View File

@ -1,313 +1,371 @@
<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="UTF-8">
<title>Condor Business Solutions SecureScan</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.4.1/socket.io.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/particles.js@2.0.0"></script>
<style>
/* General styling */
body {
background-color: #1e1e2f;
color: #dcdcdc;
font-family: 'Roboto', sans-serif;
overflow: hidden; /* Para que no aparezca la barra de scroll */
}
/* General styling */
body {
background-color: #1e1e2f;
color: #dcdcdc;
font-family: 'Roboto', sans-serif;
overflow: hidden; /* Para que no aparezca la barra de scroll */
}
h1 {
color: #00d1b2;
margin-bottom: 30px;
text-align: center;
color: #00d1b2;
margin-bottom: 30px;
text-align: center;
}
.container {
max-width: 600px;
margin: 40px auto;
padding: 20px;
background: rgba(41, 41, 61, 0.85); /* Fondo semi-transparente */
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
position: relative; /* Necesario para el contenedor */
z-index: 1;
max-width: 600px;
margin: 40px auto;
padding: 20px;
background: rgba(41, 41, 61, 0.85); /* Fondo semi-transparente */
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
position: relative; /* Necesario para el contenedor */
z-index: 1;
}
.form-control-file, .form-control, .btn {
border-radius: 50px;
margin-bottom: 15px;
border-radius: 50px;
margin-bottom: 15px;
}
.btn-primary, .btn-secondary {
width: 100%;
transition: all 0.3s ease;
width: 100%;
transition: all 0.3s ease;
}
.btn-primary:hover, .btn-secondary:hover {
background-color: #00b89c;
background-color: #00b89c;
}
.btn-primary {
background-color: #00d1b2;
border: none;
background-color: #00d1b2;
border: none;
}
.btn-secondary {
background-color: #007bff;
border: none;
background-color: #007bff;
border: none;
}
.progress {
height: 20px;
border-radius: 50px;
overflow: hidden;
height: 20px;
border-radius: 50px;
overflow: hidden;
}
.progress-bar {
transition: width 0.4s ease;
transition: width 0.4s ease;
}
.terminal {
height: 400px;
overflow-y: scroll;
background-color: #1a1a2e;
color: #00d1b2;
padding: 20px;
border-radius: 10px;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
font-family: 'Courier New', monospace;
height: 400px;
overflow-y: scroll;
background-color: #1a1a2e;
color: #00d1b2;
padding: 20px;
border-radius: 10px;
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
font-family: 'Courier New', monospace;
}
/* Scrollbar styling */
.terminal::-webkit-scrollbar {
width: 10px;
width: 10px;
}
.terminal::-webkit-scrollbar-thumb {
background-color: #00d1b2;
border-radius: 10px;
background-color: #00d1b2;
border-radius: 10px;
}
/* Responsive design */
@media (max-width: 768px) {
.container {
width: 90%;
}
.container {
width: 90%;
}
}
/* Fullscreen background for particles */
#particles-js {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 0; /* Debajo del contenido principal */
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 0; /* Debajo del contenido principal */
}
</style>
</head>
<body>
</head>
<body>
<div id="particles-js"></div>
<div class="container mt-4">
<h1>Condor Business Solutions CyberScan|Terminal Web de Escaneo</h1>
<input type="file" id="fileInput" class="form-control-file mb-3">
<button id="startScanBtn" class="btn btn-primary">Comenzar Escaneo</button>
<input type="text" id="urlInput" class="form-control" placeholder="Introduce una URL para escanear">
<button id="startUrlScanBtn" class="btn btn-secondary">Escanear URL</button>
<div id="progress" class="progress mt-3" style="display: none;">
<div id="progressBar" class="progress-bar bg-success" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div id="scanOutput" class="terminal mt-4"></div>
<div id="signaturesUsed" class="mt-3" style="display: none;">
<strong>Número de firmas utilizadas:</strong> <span id="signaturesCount"></span>
</div>
<h1>Condor Business Solutions CyberScan|Terminal Web de Escaneo</h1>
<input type="file" id="fileInput" class="form-control-file mb-3">
<button id="startScanBtn" class="btn btn-primary">Comenzar Escaneo</button>
<input type="text" id="urlInput" class="form-control" placeholder="Introduce una URL para escanear">
<button id="startUrlScanBtn" class="btn btn-secondary">Escanear URL</button>
<div id="progress" class="progress mt-3" style="display: none;">
<div id="progressBar" class="progress-bar bg-success" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div id="scanOutput" class="terminal mt-4"></div>
<div id="signaturesUsed" class="mt-3" style="display: none;">
<strong>Número de firmas utilizadas:</strong> <span id="signaturesCount"></span>
</div>
</div>
<script type="text/javascript">
var socket = io.connect('http://' + document.domain + ':' + location.port);
var socket = io.connect('http://' + document.domain + ':' + location.port);
document.getElementById('startScanBtn').onclick = function() {
var fileInput = document.getElementById('fileInput');
var file = fileInput.files[0];
document.getElementById('startScanBtn').onclick = function() {
var fileInput = document.getElementById('fileInput');
var file = fileInput.files[0];
if (!file) {
appendToTerminal('<span style="color: red;">Por favor selecciona un archivo.</span>');
return;
}
appendToTerminal('<span style="color: green;">Subiendo archivo: ' + file.name + '</span>');
var formData = new FormData();
formData.append('file', file);
// Mostrar la barra de progreso y ocultar el botón
document.getElementById('progress').style.display = 'block';
document.getElementById('startScanBtn').style.display = 'none';
fetch('/upload', {
method: 'POST',
body: formData
})
.then(response => response.text())
.then(data => {
appendToTerminal('<span style="color: green;">' + data + '</span>');
// Restablecer la visibilidad del botón después del escaneo
document.getElementById('startScanBtn').style.display = 'block';
document.getElementById('progress').style.display = 'none';
document.getElementById('progressBar').style.width = '0%';
})
.catch(error => {
appendToTerminal('<span style="color: red;">Error al subir el archivo: ' + error + '</span>');
// Restablecer la visibilidad del botón en caso de error
document.getElementById('startScanBtn').style.display = 'block';
document.getElementById('progress').style.display = 'none';
document.getElementById('progressBar').style.width = '0%';
});
};
document.getElementById('startUrlScanBtn').onclick = function() {
var urlInput = document.getElementById('urlInput').value;
if (!urlInput) {
appendToTerminal('<span style="color: red;">Por favor introduce una URL.</span>');
return;
}
// Asegurar que la URL tenga un esquema
if (!urlInput.startsWith('http://') && !urlInput.startsWith('https://')) {
urlInput = 'http://' + urlInput;
}
appendToTerminal('<span style="color: green;">Escaneando URL: ' + urlInput + '</span>');
// Mostrar la barra de progreso y ocultar el botón
document.getElementById('progress').style.display = 'block';
document.getElementById('startUrlScanBtn').style.display = 'none';
fetch('/scan_url', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ url: urlInput })
})
.then(response => response.json())
.then(data => {
if (data.error) {
appendToTerminal('<span style="color: red;">Error: ' + data.error + '</span>');
} else {
appendToTerminal('<span style="color: green;">' + data.message + '</span>');
}
// Restablecer la visibilidad del botón después del escaneo
document.getElementById('startUrlScanBtn').style.display = 'block';
document.getElementById('progress').style.display = 'none';
document.getElementById('progressBar').style.width = '0%';
})
.catch(error => {
appendToTerminal('<span style="color: red;">Error al escanear la URL: ' + error + '</span>');
// Restablecer la visibilidad del botón en caso de error
document.getElementById('startUrlScanBtn').style.display = 'block';
document.getElementById('progress').style.display = 'none';
document.getElementById('progressBar').style.width = '0%';
});
};
socket.on('scan_output', function(data) {
appendToTerminal(data.data);
// Parsear porcentaje de progreso si está presente
var progressMatch = data.data.match(/(\d+\.\d+)%/);
if (progressMatch) {
var percent = parseFloat(progressMatch[1]);
updateProgressBar(percent);
}
// Mostrar el número de firmas utilizadas (filtrando solo el número)
var signaturesMatch = data.data.match(/Known viruses: (\d+)/);
if (signaturesMatch) {
document.getElementById('signaturesUsed').style.display = 'block';
document.getElementById('signaturesCount').textContent = signaturesMatch[1];
}
});
function appendToTerminal(message) {
var scanOutput = document.getElementById('scanOutput');
var newLine = document.createElement('div');
newLine.innerHTML = message;
scanOutput.appendChild(newLine);
scanOutput.scrollTop = scanOutput.scrollHeight;
if (!file) {
appendToTerminal('<span style="color: red;">Por favor selecciona un archivo.</span>');
return;
}
function updateProgressBar(percent) {
var progressBar = document.getElementById('progressBar');
progressBar.style.width = percent + '%';
progressBar.setAttribute('aria-valuenow', percent);
progressBar.innerHTML = percent.toFixed(2) + '%';
appendToTerminal('<span style="color: green;">Subiendo archivo: ' + file.name + '</span>');
var formData = new FormData();
formData.append('file', file);
// Mostrar la barra de progreso y ocultar el botón
document.getElementById('progress').style.display = 'block';
document.getElementById('startScanBtn').style.display = 'none';
fetch('/upload', {
method: 'POST',
body: formData
})
.then(response => response.text())
.then(data => {
appendToTerminal('<span style="color: green;">' + data + '</span>');
// Restablecer la visibilidad del botón después del escaneo
document.getElementById('startScanBtn').style.display = 'block';
document.getElementById('progress').style.display = 'none';
document.getElementById('progressBar').style.width = '0%';
})
.catch(error => {
appendToTerminal('<span style="color: red;">Error al subir el archivo: ' + error + '</span>');
// Restablecer la visibilidad del botón en caso de error
document.getElementById('startScanBtn').style.display = 'block';
document.getElementById('progress').style.display = 'none';
document.getElementById('progressBar').style.width = '0%';
});
};
document.getElementById('startScanBtn').onclick = function() {
var fileInput = document.getElementById('fileInput');
var file = fileInput.files[0];
if (!file) {
appendToTerminal('<span style="color: red;">Por favor selecciona un archivo.</span>');
return;
}
// Configurar particles.js
particlesJS('particles-js', {
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"value_area": 800
}
},
"color": {
"value": "#ffffff"
},
"shape": {
"type": "circle",
"stroke": {
"width": 0,
"color": "#000000"
},
"polygon": {
"nb_sides": 5
},
},
"opacity": {
"value": 0.5,
"random": false,
"anim": {
"enable": false,
"speed": 1,
"opacity_min": 0.1,
"sync": false
}
},
"size": {
"value": 3,
"random": true,
"anim": {
"enable": false,
"speed": 40,
"size_min": 0.1,
"sync": false
}
},
"line_linked": {
"enable": true,
"distance": 150,
"color": "#ffffff",
"opacity": 0.4,
"width": 1
},
"move": {
"enable": true,
"speed": 6,
"direction": "none",
"random": false,
"straight": false,
"out_mode": "out",
"attract": {
"enable": false,
"rotateX": 600,
"rotateY": 1200
}
}
appendToTerminal('<span style="color: green;">Subiendo archivo: ' + file.name + '</span>');
var formData = new FormData();
formData.append('file', file);
// Mostrar la barra de progreso y ocultar el botón
document.getElementById('progress').style.display = 'block';
document.getElementById('startScanBtn').style.display = 'none';
fetch('/upload', {
method: 'POST',
body: formData
})
.then(response => response.text())
.then(data => {
appendToTerminal('<span style="color: green;">' + data + '</span>');
// Restablecer la visibilidad del botón después del escaneo
document.getElementById('startScanBtn').style.display = 'block';
document.getElementById('progress').style.display = 'none';
document.getElementById('progressBar').style.width = '0%';
// Limpiar el input de archivo
document.getElementById('fileInput').value = '';
})
.catch(error => {
appendToTerminal('<span style="color: red;">Error al subir el archivo: ' + error + '</span>');
// Restablecer la visibilidad del botón en caso de error
document.getElementById('startScanBtn').style.display = 'block';
document.getElementById('progress').style.display = 'none';
document.getElementById('progressBar').style.width = '0%';
// Limpiar el input de archivo en caso de error
document.getElementById('fileInput').value = '';
});
};
document.getElementById('startUrlScanBtn').onclick = function() {
var urlInput = document.getElementById('urlInput').value;
if (!urlInput) {
appendToTerminal('<span style="color: red;">Por favor introduce una URL.</span>');
return;
}
// Asegurar que la URL tenga un esquema
if (!urlInput.startsWith('http://') && !urlInput.startsWith('https://')) {
urlInput = 'http://' + urlInput;
}
appendToTerminal('<span style="color: green;">Escaneando URL: ' + urlInput + '</span>');
// Mostrar la barra de progreso y ocultar el botón
document.getElementById('progress').style.display = 'block';
document.getElementById('startUrlScanBtn').style.display = 'none';
fetch('/scan_url', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ url: urlInput })
})
.then(response => {
// Comprobar si la respuesta es JSON
const contentType = response.headers.get('content-type');
if (contentType && contentType.includes('application/json')) {
return response.json();
} else {
return response.text(); // Si no es JSON, tratarlo como texto
}
})
.then(data => {
if (typeof data === 'string') {
appendToTerminal('<span style="color: red;">Respuesta inesperada: ' + data + '</span>');
} else if (data.error) {
appendToTerminal('<span style="color: red;">Error: ' + data.error + '</span>');
} else {
appendToTerminal('<span style="color: green;">' + data.message + '</span>');
}
// Restablecer la visibilidad del botón después del escaneo
document.getElementById('startUrlScanBtn').style.display = 'block';
document.getElementById('progress').style.display = 'none';
document.getElementById('progressBar').style.width = '0%';
// Limpiar el input de URL
document.getElementById('urlInput').value = '';
})
.catch(error => {
appendToTerminal('<span style="color: red;">Error al escanear la URL: ' + error + '</span>');
// Restablecer la visibilidad del botón en caso de error
document.getElementById('startUrlScanBtn').style.display = 'block';
document.getElementById('progress').style.display = 'none';
document.getElementById('progressBar').style.width = '0%';
// Limpiar el input de URL en caso de error
document.getElementById('urlInput').value = '';
});
};
socket.on('scan_output', function(data) {
appendToTerminal(data.data);
// Parsear porcentaje de progreso si está presente
var progressMatch = data.data.match(/(\d+\.\d+)%/);
if (progressMatch) {
var percent = parseFloat(progressMatch[1]);
updateProgressBar(percent);
}
// Mostrar el número de firmas utilizadas (filtrando solo el número)
var signaturesMatch = data.data.match(/Known viruses: (\d+)/);
if (signaturesMatch) {
document.getElementById('signaturesUsed').style.display = 'block';
document.getElementById('signaturesCount').textContent = signaturesMatch[1];
}
});
function appendToTerminal(message) {
var scanOutput = document.getElementById('scanOutput');
var newLine = document.createElement('div');
newLine.innerHTML = message;
scanOutput.appendChild(newLine);
scanOutput.scrollTop = scanOutput.scrollHeight;
}
function updateProgressBar(percent) {
var progressBar = document.getElementById('progressBar');
progressBar.style.width = percent + '%';
progressBar.setAttribute('aria-valuenow', percent);
progressBar.innerHTML = percent.toFixed(2) + '%';
}
// Configurar particles.js
particlesJS('particles-js', {
"particles": {
"number": {
"value": 80,
"density": {
"enable": true,
"value_area": 800
}
},
"color": {
"value": "#ffffff"
},
"shape": {
"type": "circle",
"stroke": {
"width": 0,
"color": "#000000"
},
"interactivity": {
"detect_on": "canvas",
"events": {
"onhover": {
"enable": false
},
"onclick": {
"enable": false
},
"resize": true
},
"polygon": {
"nb_sides": 5
},
"retina_detect": true
});
},
"opacity": {
"value": 0.5,
"random": false,
"anim": {
"enable": false,
"speed": 1,
"opacity_min": 0.1,
"sync": false
}
},
"size": {
"value": 3,
"random": true,
"anim": {
"enable": false,
"speed": 40,
"size_min": 0.1,
"sync": false
}
},
"line_linked": {
"enable": true,
"distance": 150,
"color": "#ffffff",
"opacity": 0.4,
"width": 1
},
"move": {
"enable": true,
"speed": 6,
"direction": "none",
"random": false,
"straight": false,
"out_mode": "out",
"attract": {
"enable": false,
"rotateX": 600,
"rotateY": 1200
}
}
},
"interactivity": {
"detect_on": "canvas",
"events": {
"onhover": {
"enable": false
},
"onclick": {
"enable": false
},
"resize": true
},
},
"retina_detect": true
});
</script>
</body>
</body>
</html>