Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] In 3.3.5a has anyone found a possible way to read/write Binary from the server to the client?

[DiscordArchive] In 3.3.5a has anyone found a possible way to read/write Binary from the server to the client?

[DiscordArchive] In 3.3.5a has anyone found a possible way to read/write Binary from the server to the client?

rektbyfaith
Administrator
0
05-21-2025, 06:16 PM
#1
Archived author: Mali • Posted: 2025-05-21T18:16:02.286000+00:00
Original source

In 3.3.5a has anyone found a possible way to read/write Binary from the server to the client?
For example, sending an image from the server to the client using AIO?
rektbyfaith
05-21-2025, 06:16 PM #1

Archived author: Mali • Posted: 2025-05-21T18:16:02.286000+00:00
Original source

In 3.3.5a has anyone found a possible way to read/write Binary from the server to the client?
For example, sending an image from the server to the client using AIO?

rektbyfaith
Administrator
0
05-21-2025, 06:19 PM
#2
Archived author: Titi • Posted: 2025-05-21T18:19:52.513000+00:00
Original source

custom packets? might be a bit heavy for addon messages (aio), also might not support sending raw bytes because they'd be special characters or it'd be too long
rektbyfaith
05-21-2025, 06:19 PM #2

Archived author: Titi • Posted: 2025-05-21T18:19:52.513000+00:00
Original source

custom packets? might be a bit heavy for addon messages (aio), also might not support sending raw bytes because they'd be special characters or it'd be too long

rektbyfaith
Administrator
0
05-21-2025, 06:20 PM
#3
Archived author: Mali • Posted: 2025-05-21T18:20:22.352000+00:00
Original source

That's where base64 encoding would come into play.
rektbyfaith
05-21-2025, 06:20 PM #3

Archived author: Mali • Posted: 2025-05-21T18:20:22.352000+00:00
Original source

That's where base64 encoding would come into play.

rektbyfaith
Administrator
0
05-21-2025, 06:22 PM
#4
Archived author: Titi • Posted: 2025-05-21T18:22:39.132000+00:00
Original source

isn't there a character limit ? I guess you could add some header to split between messages tho
rektbyfaith
05-21-2025, 06:22 PM #4

Archived author: Titi • Posted: 2025-05-21T18:22:39.132000+00:00
Original source

isn't there a character limit ? I guess you could add some header to split between messages tho

rektbyfaith
Administrator
0
05-21-2025, 06:22 PM
#5
Archived author: Mali • Posted: 2025-05-21T18:22:57.795000+00:00
Original source

```lua
function House_market(player, args)
local function base64Encode(data)
local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
return ((data:gsub('.', function(x)
local r, bcode = '', x:byte()
for i = 8, 1, -1 do r = r .. (bcode % 2 ^ i - bcode % 2 ^ (i - 1) > 0 and '1' or '0') end
return r
end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
if (#x < 6) then return '' end
local c = 0
for i = 1, 6 do c = c + (xConfusedub(i, i) == '1' and 2 ^ (6 - i) or 0) end
return bConfusedub(c + 1, c + 1)
end)..({ '', '==', '=' })[#data % 3 + 1])
end

local file = io.open("image.png", "rb")
if not file then
player:SendBroadcastMessage("Converted image not found")
return false
end
local pngData = file:read("*a")
file:close()

local b64 = base64Encode(pngData)
local dataURL = "data:image/png;base64," .. b64

AIO.Handle(player, "Market", "Show", ids, owners, prices, xs, ys, zs, maps, zones, dataURL)
return false
end
```

server side ^
client side v
```lua
function UI.Show(player, img)
if img then
print(img)
return
end
```
[Image: image.png?ex=690c3ec1&is=690aed41&hm=4d3...219374bbf&]
rektbyfaith
05-21-2025, 06:22 PM #5

Archived author: Mali • Posted: 2025-05-21T18:22:57.795000+00:00
Original source

```lua
function House_market(player, args)
local function base64Encode(data)
local b = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
return ((data:gsub('.', function(x)
local r, bcode = '', x:byte()
for i = 8, 1, -1 do r = r .. (bcode % 2 ^ i - bcode % 2 ^ (i - 1) > 0 and '1' or '0') end
return r
end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x)
if (#x < 6) then return '' end
local c = 0
for i = 1, 6 do c = c + (xConfusedub(i, i) == '1' and 2 ^ (6 - i) or 0) end
return bConfusedub(c + 1, c + 1)
end)..({ '', '==', '=' })[#data % 3 + 1])
end

local file = io.open("image.png", "rb")
if not file then
player:SendBroadcastMessage("Converted image not found")
return false
end
local pngData = file:read("*a")
file:close()

local b64 = base64Encode(pngData)
local dataURL = "data:image/png;base64," .. b64

AIO.Handle(player, "Market", "Show", ids, owners, prices, xs, ys, zs, maps, zones, dataURL)
return false
end
```

server side ^
client side v
```lua
function UI.Show(player, img)
if img then
print(img)
return
end
```
[Image: image.png?ex=690c3ec1&is=690aed41&hm=4d3...219374bbf&]

rektbyfaith
Administrator
0
05-21-2025, 06:23 PM
#6
Archived author: Mali • Posted: 2025-05-21T18:23:09.256000+00:00
Original source

You can bypass character limits on WoW's client, as can be seen ^
rektbyfaith
05-21-2025, 06:23 PM #6

Archived author: Mali • Posted: 2025-05-21T18:23:09.256000+00:00
Original source

You can bypass character limits on WoW's client, as can be seen ^

rektbyfaith
Administrator
0
05-21-2025, 06:24 PM
#7
Archived author: Mali • Posted: 2025-05-21T18:24:55.519000+00:00
Original source

I also exposed file open perms on the client, but I've yet to expose file write.
If I can expose file write perms on the client itself, I could just send rb from the server to the client and save.
But that is something I haven't yet exposed.
Only file open.
rektbyfaith
05-21-2025, 06:24 PM #7

Archived author: Mali • Posted: 2025-05-21T18:24:55.519000+00:00
Original source

I also exposed file open perms on the client, but I've yet to expose file write.
If I can expose file write perms on the client itself, I could just send rb from the server to the client and save.
But that is something I haven't yet exposed.
Only file open.

rektbyfaith
Administrator
0
05-21-2025, 06:26 PM
#8
Archived author: Mali • Posted: 2025-05-21T18:26:15.211000+00:00
Original source

I have a mock system to "write" from the client.
But it sends the data back to the server where io is already readily available in Lua.
rektbyfaith
05-21-2025, 06:26 PM #8

Archived author: Mali • Posted: 2025-05-21T18:26:15.211000+00:00
Original source

I have a mock system to "write" from the client.
But it sends the data back to the server where io is already readily available in Lua.

rektbyfaith
Administrator
0
05-21-2025, 07:55 PM
#9
Archived author: Natrist • Posted: 2025-05-21T19:55:34.668000+00:00
Original source

0x0080C340
```C++
bool __cdecl Spell_C_HandleTerrainClick(struct CTerrainClickEvent const &)
```
rektbyfaith
05-21-2025, 07:55 PM #9

Archived author: Natrist • Posted: 2025-05-21T19:55:34.668000+00:00
Original source

0x0080C340
```C++
bool __cdecl Spell_C_HandleTerrainClick(struct CTerrainClickEvent const &)
```

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)