Posted: Tue Aug 19, 2014 3:25 am Post subject: Print without newline?
Code:
offset = AOBScan("94 00 11 00 24 00 1C 00 00")
count=stringlist_getCount(offset) - 1
x = 0
for x = 0, count do
offset[x] = offset.getString(x)
newoffset = tonumber(offset[x], 16) + 0x45
print(string.format("%02X", newoffset))
AESKey = readBytes(string.format("%02X", newoffset), 16, true)
y = 1
for y = 1, 16 do
print(string.format("%02X", AESKey[y]))
end
end
Basically I want the AESKey printed like that, but since print always applies a \n, the data is a mess.
I tried googling around and found the io.write() function but nothing ever gets displayed in the lua engine (possibly has no stdout?).
So I'm hoping someone can point me in the right direction.
local offset = AOBScan("94 00 11 00 24 00 1C 00 00");
if (not offset) then return print("Couldn't find it"); end
for x = 0, offset.Count-1 do
local newoffset = ('0x' .. offset.getString(x)) + 0x45 ;
print(string.format("%02X", newoffset))
local AESKey = readBytes(string.format("%02X", newoffset), 16, true)
for key,value in pairs(AESKey) do
AESKey[key] = string.format("%02X",value);
end
print(table.concat(AESKey, " "));
end
_________________
I'm rusty and getting older, help me re-learn lua.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum