-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAntiMalware.sh
55 lines (40 loc) · 2.52 KB
/
AntiMalware.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Definir PASTEBIN API KEY
PASTEBIN_API_KEY="cvPMpeOkL2hT9cOWQpDFBa7luqyDmmX8"
# Limpiar la pantalla
clear
echo "\033[1;37m"
echo " #########################"
echo " # MalwareDetector #"
echo " # #"
echo " # -By HeyArnoldo #"
echo " #########################"
echo " # Presiona Ctrl + C #"
echo " # Para pararlo #"
echo " #########################"
echo ""
sleep 1
echo "\033[0;37m$(date +"%H:%M:%S") \033[1;33m[AntiMalware] \033[0;37m[\033[0;33m⚠︎\033[0;37m] \033[1;37mDownloading MalwareDetector..."
DOWNLOAD_ANTI_MALWARE="wget https://github.com/OpticFusion1/MCAntiMalware/releases/download/15.14/MCAntiMalware.jar"
$DOWNLOAD_ANTI_MALWARE
echo "\033[0;37m$(date +"%H:%M:%S") \033[1;33m[AntiMalware] \033[0;37m[\033[0;32m✔\033[0;37m] \033[1;37mSuccessfully downloaded MalwareDetector :)"
echo "\033[0;37m$(date +"%H:%M:%S") \033[1;33m[AntiMalware] \033[0;37m[\033[0;33m⚠︎\033[0;37m] \033[1;37mStarting Analisis..."
sleep 1
# Ejecutar el análisis y redirigir la salida a un archivo de logs
ANALISIS="timeout 10s java -jar MCAntiMalware.jar > malware_detection.log 2>&1"
$ANALISIS
# Subir el archivo de logs a Pastebin y obtener el enlace
echo "\033[0;37m$(date +"%H:%M:%S") \033[1;33m[AntiMalware] \033[0;37m[\033[0;33m⚠︎\033[0;37m] \033[1;37mUploading logs to Pastebin..."
PASTEBIN_URL=$(curl -s -d "api_dev_key=$PASTEBIN_API_KEY" \
-d "api_option=paste" \
-d "api_paste_name=MalwareDetectionLogs" \
-d "api_paste_code=$(cat malware_detection.log)" \
https://pastebin.com/api/api_post.php)
echo "\033[0;37m$(date +"%H:%M:%S") \033[1;33m[AntiMalware] \033[0;37m[\033[0;32m✔\033[0;37m] \033[1;37mLogs uploaded to Pastebin. Here is the link: $PASTEBIN_URL"
echo "\033[0;37m$(date +"%H:%M:%S") \033[1;33m[AntiMalware] \033[0;37m[\033[0;33m⚠︎\033[0;37m] \033[1;37mAnalisis finished, check the results in the console."
sleep 1
echo "\033[0;37m$(date +"%H:%M:%S") \033[1;33m[AntiMalware] \033[0;37m[\033[0;33m⚠︎\033[0;37m] \033[1;37mDeleting MalwareDetector..."
DELETE_ANTI_MALWARE="rm MCAntiMalware.jar && rm -rf AntiMalware"
$DELETE_ANTI_MALWARE
echo "\033[0;37m$(date +"%H:%M:%S") \033[1;33m[AntiMalware] \033[0;37m[\033[0;32m✔\033[0;37m] \033[1;37mSuccessfully deleted MalwareDetector"
echo "\033[0;37m$(date +"%H:%M:%S") \033[1;33m[AntiMalware] \033[0;37m[\033[0;32m✔\033[0;37m] \033[1;37mAntiMalware finished, have a nice day :)"