-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtools.lua
More file actions
111 lines (94 loc) · 3.26 KB
/
Copy pathtools.lua
File metadata and controls
111 lines (94 loc) · 3.26 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
-- Script Lua Utama (revisi: fix cookie creation + debug android_id)
io.stdout:setvbuf("no")
function split(str, sep)
local t = {}
for s in string.gmatch(str, "([^" .. sep .. "]+)") do
table.insert(t, s)
end
return t
end
local android_ids = {
"b2daadc59b66fe5d", "7c2e91ab5d4f8e63", "d4b8a1c9e7f26b35",
"3f6a9d2c8b1e7a54", "b7e3c92d1f6a8b45", "5a1d8c7e3b9f2a64",
"c8b4e1a7d2f96c35", "2d7a5c9e1b4f8a63"
}
local license_keys = {
"DTmKsAoHxWXxHKgBZyeKHCDfrWwfSBsQ", "fqYtfToWiIaRNCDOwPhKhXBtnVyPpKIb",
"cmvNePELIiglFEGBFipaKlLhsmZAeZXJ", "SAhfmRwlPSeAbHvMjJuMDCjbBnhnnwbg",
"ggbYpSmpYmOMChFbuGuLoxlrkxUinMTd", "FfxjVpAxqhzjCAPFZpAXSDRIkkdNCKDu",
"LHwoeqrKnDAnHhqCFKKLONtgyzwrtEWX", "YdTfaJbVAzUbbQlAxQnJdmILfaVLmiOC"
}
-- Fetch cookies
local handle = io.popen("curl -s https://pastebin.com/raw/5W6JG08Y")
local content = handle:read("*a")
handle:close()
local cookies = split(content, "\n")
local filtered = {}
for _, c in ipairs(cookies) do if c ~= "" then table.insert(filtered, c) end end
cookies = filtered
-- Input
io.write("Masukkan nomor device (1+): ")
io.flush()
local device = tonumber(io.read())
if not device or device < 1 then
print("Invalid device number.")
os.exit(1)
end
-- Index logic
local group = math.ceil(device / 3)
local idx = ((group - 1) % 8) + 1
-- Android ID
local aid = android_ids[idx]
local cmd = "content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:" .. aid
local res = os.execute("su -c '" .. cmd .. "' > /dev/null 2>&1")
if res == 0 then
print("Berhasil set android_id: " .. aid)
else
print("Gagal set android_id (root/content insert error).")
print("Coba manual: su -c 'content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:" .. aid .. "'")
end
io.stdout:flush()
-- License
local lk = license_keys[idx]
local dir = "/storage/emulated/0/RonixExploit/internal"
local path = dir .. "/_key.txt"
os.execute("mkdir -p " .. dir)
os.execute("chmod 777 " .. dir)
local f = io.open(path, "w")
if f then
f:write(lk .. "\n")
f:close()
os.execute("chmod 644 " .. path)
print("Berhasil inject license: " .. path)
else
print("Gagal inject license: " .. path .. " (cek termux-setup-storage)")
end
io.stdout:flush()
-- Cookies
local per_dev = 5
local start = (device - 1) * per_dev + 1
local fin = start + per_dev - 1
local home = os.getenv("HOME") or "/data/data/com.termux/files/home"
local cpath = home .. "/cookie.txt"
-- Paksa buat file kalau belum ada
os.execute("touch " .. cpath .. " 2>/dev/null")
os.execute("chmod 664 " .. cpath .. " 2>/dev/null")
local cf = io.open(cpath, "w")
if cf then
if start > #cookies then
print("Tidak cukup cookies (total: " .. #cookies .. "). Tambah di pastebin.")
else
fin = math.min(fin, #cookies)
for i = start, fin do
cf:write(cookies[i] .. "\n")
end
cf:close()
print("Berhasil inject " .. (fin - start + 1) .. " cookies ke " .. cpath)
end
else
print("Masih gagal buat/buka " .. cpath .. " meski sudah touch.")
print("Solusi: Jalankan 'touch ~/cookie.txt' manual, lalu coba lagi.")
print("Atau: pkg update && pkg upgrade && termux-setup-storage")
end
io.stdout:flush()
print("\nSelesai untuk device " .. device .. ".")