10:15 <+bridge> [ddnet] @heinrich5991 why did you use `#define GET_INT(integer) (integer) = str_toint(Up.GetString())`Β instead of `Up.GetInt()`? 15:05 <+bridge> [ddnet] because I figured it would be easier to implement for third-party software 15:06 <+bridge> [ddnet] feel free to change it, I think in 0.7 they changed it for the normal protocol as well @Learath2 15:07 <@Learath2> heinrich5991: I have a very tough issue with fixing the protocol compatibility in 0.7, do you have a second to brainstorm? 15:07 <+bridge> [ddnet] Learath2: what's the issue? 15:08 <+bridge> [ddnet] Old versions trust m_NumClient to be the amount of clients we send. But we cant know how many clients fit in the packet before we craft it 15:10 <+bridge> [ddnet] I had a very meh idea of crafting the packet until we add num clients, craft the rest of the packet and drop clients until the extra int for numclient fits, however you know that's very ugly due to the way the packer works 15:12 <+bridge> [ddnet] The only two ways I know of to pop off clients is either finding a way to iterate the packer backwards or keep note of the offsets of every client I add, both are ;( 15:13 <+bridge> [ddnet] returning different server info depending on the requesting client is not an option? 15:14 <+bridge> [ddnet] @heinrich5991 problem is how many clients we send to an oldclient 15:14 <+bridge> [ddnet] ah 15:15 <+bridge> [ddnet] remember offset of last client 15:15 <+bridge> [ddnet] after each client check that the int + header + clients still fit 15:15 <+bridge> [ddnet] if not, return previous packet 15:15 <+bridge> [ddnet] (use `CVariableInt` directly) 15:16 <+bridge> [ddnet] Oh I'm stupid, I tried handling it after I filled the packet 15:17 <+bridge> [ddnet] Ofc I should handle it during filling it. Thanks @heinrich5991 15:17 <+bridge> [ddnet] you're welcome πŸ˜‰ 15:17 <+bridge> [ddnet] Two heads are better then one :P 15:18 <+bridge> [ddnet] my uni postponed the next semester by one week, corona 15:18 <+bridge> [ddnet] or rather my state (berlin) did that 15:19 <+bridge> [ddnet] A month for italian unis 15:19 <+bridge> [ddnet] ah 15:19 <+bridge> [ddnet] do you have other effects? πŸ™‚ 15:19 <+bridge> [ddnet] Well I'm completely stuck in istanbul 15:20 <+bridge> [ddnet] oh 15:20 <+bridge> [ddnet] But friends who are stuck on the other side in italy report that the streets are completely empty and the vibe is pretty meh 15:20 <+bridge> [ddnet] got a sensible computer at least? 15:21 <+bridge> [ddnet] @heinrich5991 sensible enough for working on some coding 15:21 <+bridge> [ddnet] I don't deserve to play games anyway so I don't mind 15:21 <+bridge> [ddnet] ~~ 15:23 <+bridge> [ddnet] @heinrich5991 how is berlin? Italy is supposedly the worst in europe but idk 15:23 <+bridge> [ddnet] berlin looks fine 15:23 <+bridge> [ddnet] people go about their day mostly as usual 15:24 <+bridge> [ddnet] large events are cancelled, at least the uni tries to encourage people to work from home 15:24 <+bridge> [ddnet] btw, are you into coding challenges? 15:25 <+bridge> [ddnet] I found some nice ones: https://cryptopals.com/ 15:25 <+bridge> [ddnet] @heinrich5991 r u doing the ctf that liveoverflow announced? 15:26 <+bridge> [ddnet] no, link? 15:26 <+bridge> [ddnet] liveoverflow is a fun watch, I thought the guy was @heinrich5991 for a while πŸ˜› 15:26 <+bridge> [ddnet] nowhere near that skilled 15:27 <+bridge> [ddnet] Wtf @Learath2 15:27 <+bridge> [ddnet] https://youtu.be/kLZdnvvQRKY 15:27 <+bridge> [ddnet] oh 15:27 <+bridge> [ddnet] cscg 15:27 <+bridge> [ddnet] I considered participating this year 15:28 <+bridge> [ddnet] I tried but too lazy 15:28 <+bridge> [ddnet] doit 15:28 <+bridge> [ddnet] The Perl challenge is so frustrating 15:29 <+bridge> [ddnet] @heinrich5991 he might be more acquainted with ctfs but dont undersell yourself :P 15:30 <+bridge> [ddnet] you're flattering me, thanks πŸ˜› 15:31 <+bridge> [ddnet] I've never really done any serious RE unfortunately 15:31 <+bridge> [ddnet] I should kick myself a little more. I'd love to do some hardware disassembly/RE 15:36 <+bridge> [ddnet] I'm actually also really interested in some hardware work, especially "security" devices 15:36 <+bridge> [ddnet] I'd be fine with non-security devices for starters 15:36 <+bridge> [ddnet] That ring buffer attack on most garage doors was really interesting e.g. 15:36 <+bridge> [ddnet] given that I have no experience 15:37 <+bridge> [ddnet] ring buffer? 15:40 <+bridge> [ddnet] Not a ring buffer, soz. A shift register 15:40 <+bridge> [ddnet] shift register? πŸ™‚ 15:42 <+bridge> [ddnet] Turns out many garage doors out there use a shift register to store the transmitted code, which allows you to reduce the amount of transmissions needed by a whole lot which made all of them very easy to bruteforce 15:43 <+bridge> [ddnet] I don't know what a shift register ist 15:43 <+bridge> [ddnet] *is 15:44 <+bridge> [ddnet] Ah, it's a type of register you can shift bits into, and out of one at a time. Like a queue of bits 15:44 <+bridge> [ddnet] ah 15:45 <+bridge> [ddnet] Problem was that the cpu was checking the code every time a bit is pushed and not after getting all 12 bits 15:46 <+bridge> [ddnet] You generate a string of all possible 12 bit combinations with overlap and transmit that a couple times instead 15:47 <+bridge> [ddnet] Turns out to be a lot less bits then without overlap. The guy figured it out with one of those logic analyzers 15:47 <+bridge> [ddnet] I think there was a youtube video where he describes how he devised the attack 15:58 <+bridge> [ddnet] @Learath2 happen to have the link? 16:01 <+bridge> [ddnet] also @Learath2 mind merging the antibot stuff? ^^ 16:01 <+bridge> [ddnet] :f3: 16:02 <+bridge> [ddnet] @heinrich5991 I'll find you the link when I get home, I'll review the antibot stuff as soon as I'm done with this extended serverinfo patch for 0.7 16:02 <+bridge> [ddnet] @heinrich5991 is there a way to estimate the size of a packed int cheaper then Packing it? 16:03 <+bridge> [ddnet] just pack it. should be optimized out 16:03 <+bridge> [ddnet] (if you pack it into a buffer that is not used elsewhere) 16:03 <+bridge> [ddnet] You sure? i'd need to pack it and then subtract the buffer from the end of the packed data, is the compiler clever enough? 16:04 <+bridge> [ddnet] well I guess if any compiler is smart enough it's a C/C++ compiler, those are so aggressive with optimisations 16:07 <+bridge> [ddnet] cant u assume max size (4 bytes per?) if its only an estimate 16:07 <+bridge> [ddnet] https://godbolt.org/z/LYWgCt 16:07 <+bridge> [ddnet] seems so 16:07 <+bridge> [ddnet] that it's optimized out 16:18 <+bridge> [ddnet] @heinrich5991 one more little bug and I can review yours, do you know of a way to append a packer to a packer? 16:18 <+bridge> [ddnet] I tried adding the second packer as raw, but that doesn't seem to work :/ 16:18 <+bridge> [ddnet] AddRaw(.Data(), .Size()) 16:18 <+bridge> [ddnet] `AddRaw(.Data(), .Size())` 16:18 <+bridge> [ddnet] should work 16:19 <@Learath2> Ah I forgot to reset the packer 16:20 <+bridge> [ddnet] the liveoverflow is apologizing for the name 16:20 <+bridge> [ddnet] rightfully so πŸ˜› 16:21 <+bridge> [ddnet] NOOO, old clients don't trust the m_NumClients so the server looks as full as the amount of clients we send 16:21 <+bridge> [ddnet] @heinrich5991 is that an acceptable shortcoming? I don't think I can fix it 16:22 <+bridge> [ddnet] I guess 16:22 <+bridge> [ddnet] wasnt this a problem during ddos attacks 16:22 <+bridge> [ddnet] when the server wasnt sending players 16:22 <+bridge> [ddnet] and then not showing up 16:22 <+bridge> [ddnet] they "fixed" it in 0.7 16:22 <+bridge> [ddnet] so you can't send short packets anymore 16:22 <+bridge> [ddnet] eh 16:22 <+bridge> [ddnet] Well given in the past the server wouldn't even show up if the clients didn't fit in the packet I think this is acceptable 16:22 <+bridge> [ddnet] when in reality they only helped mitigate dos attacks 16:22 <+bridge> [ddnet] @Learath2 yes 16:23 <+bridge> [ddnet] i guess im thinking of a different problem then 16:23 <+bridge> [ddnet] but the one i describe is where the client tries to determine playercount by counting the players the server sends 16:23 <+bridge> [ddnet] which doesnt work when the server omits player list under heavy load 16:30 <+bridge> [ddnet] @heinrich5991 https://github.com/teeworlds/teeworlds/pull/2492 I'm done 16:30 <+bridge> [ddnet] Take a look at mine, I'll take a look at yours πŸ˜› 16:31 <+bridge> [ddnet] I won't merge yours though(?) 16:31 <+bridge> [ddnet] oy does that 16:33 <+bridge> [ddnet] @Learath2 why do you drop the more-players-packet if it arrives before the main packet? 16:35 <+bridge> [ddnet] @heinrich5991 because the entry doesn't exist by then and I have no idea how to handle that 16:35 <+bridge> [ddnet] and yeah I know you won't merge, just looking for a review 16:35 <+bridge> [ddnet] I thinkβ„’ ddnet handles that 16:35 <+bridge> [ddnet] maybe you can take a look at that 16:36 <+bridge> [ddnet] for the protocol extension, I'd add a UUID, and scan the whole packet for it 16:36 <+bridge> [ddnet] just so that you're compatible with other (possible, unlikely to exist) modifications 16:37 <+bridge> [ddnet] @heinrich5991 this isn't really a whole extension, I'm not sure if we can extend the protocol without breaking compatibility 16:39 <+bridge> [ddnet] I kept the initial packet the same so the old clients can also use it, I have "giex" for requests from the serverbrowser but that's not really a thing for ingame serverinfo updates, we'd need some way to keep track of the version of the client and whether it supports the new protocol, is that a thing vanilla wants? I'm not sure if oy would merge an extension like that 16:40 <+bridge> [ddnet] @heinrich5991 why do you have a separate `ANTIBOT_MAX_CLIENTS`? Shouldn't you tie that into the engines `MAX_CLIENTS` so there is no chance it falls out of sync? 16:40 <+bridge> [ddnet] I have a separate `ANTIBOT_MAX_CLIENTS` so that the API doesn't accidentally become incompatible 16:40 <+bridge> [ddnet] hm 16:41 <+bridge> [ddnet] maybe I should add a test that they're the same and add a comment to recompile all anticheat modules if you change it 16:44 <+bridge> [ddnet] given that there are probably no protocol extensions that you could be incompatible with, I guess this is fine 16:44 <+bridge> [ddnet] (re your PR) 16:44 <+bridge> [ddnet] Your pr LGTM, the last concern I have is how we'll build the official servers 16:44 <+bridge> [ddnet] how do we build official servers? 16:45 <+bridge> [ddnet] Currently we just git pull and build, I think we need a new (private)repo for the antibot code 16:45 <+bridge> [ddnet] nah 16:45 <+bridge> [ddnet] antibot can be built sporadically and the `.so` can just be copied in after the built 16:45 <+bridge> [ddnet] antibot can be built sporadically and the `.so` can just be copied in after the build 16:46 <+bridge> [ddnet] Does this generate an antibot.so? 16:46 <+bridge> [ddnet] the build? yes 16:46 <+bridge> [ddnet] if you add `ANTIBOT=ON` to the command line 16:46 <+bridge> [ddnet] so we just don't copy the one built along with the server and use @onby's module instead 16:46 <+bridge> [ddnet] yes 16:46 <+bridge> [ddnet] Great, I don't see any issues then 16:47 <+bridge> [ddnet] \o/ 16:47 <+bridge> [ddnet] :D 16:47 <+bridge> [ddnet] hi ping 16:47 <+bridge> [ddnet] hi 16:47 <+bridge> [ddnet] cool to see this geting implemented 16:48 <+bridge> [ddnet] We still should have a private repo with the antibot code we can all work on 16:48 <+bridge> [ddnet] currently it's an almost-not-modified version of noby's 16:48 <+bridge> [ddnet] gitlab? 16:48 <+bridge> [ddnet] just includes 16:49 <+bridge> [ddnet] and I believe no one except noby really wants to change that code πŸ˜„ @ @onby 16:49 <+bridge> [ddnet] I can merge this tonight and we can try deploying it. Will add a new script to ddnet-scripts to pull from a repository and build the antibot too 16:49 <+bridge> [ddnet] i plan on making updates 16:49 <+bridge> [ddnet] ive been constantly updating it for the past couple years rly lol 16:50 <+bridge> [ddnet] I do trust @onby but I'd still not want to run code we can't see on ddnet servers 16:50 <+bridge> [ddnet] yes sure 16:50 <+bridge> [ddnet] just a note regards modification 16:50 <+bridge> [ddnet] just a note regarding modification 16:50 <+bridge> [ddnet] ye if we make a private repo for the 3 of us or whichever other admins then its fine as long as the code never leaves that repo 16:52 <+bridge> [ddnet] Github private repo? 16:52 <+bridge> [ddnet] would work up to a couple of members, not as a subrepo of ddnet though 16:52 <+bridge> [ddnet] i use gitlab since free private repos 16:52 <+bridge> [ddnet] Yep, I could own the repo, ddnet org doesn't have private repo allowance 16:53 <+bridge> [ddnet] oh, you're even have a subscription 16:53 <+bridge> [ddnet] oh, you even have a subscription 16:53 <+bridge> [ddnet] nah, I'm a student 16:54 <+bridge> [ddnet] we could host the repo on gitlab aswell if you prefer that 16:55 <+bridge> [ddnet] (I'm a student for atleast 2 more years so that'd be the lifetime) πŸ˜› 16:56 <+bridge> [ddnet] its about the same right 16:56 <+bridge> [ddnet] other than offering free private. repos 16:57 <+bridge> [ddnet] yes, github too, for up to three (four?) collaborators 16:57 <+bridge> [ddnet] is that new 16:57 <+bridge> [ddnet] i only moved from gitlab to github because of the private repos thing 16:57 <+bridge> [ddnet] if yall can do it on github then fine by me 16:58 <+bridge> [ddnet] Okay, I'll create the repo on github, add y'all as contributors 16:58 <+bridge> [ddnet] :D 16:58 <+bridge> [ddnet] so when i make fixes to the anti bot code 16:58 <+bridge> [ddnet] i will push them there? and theyll be added whenever is next convienent time 16:58 <+bridge> [ddnet] exactly 16:58 <+bridge> [ddnet] sounds good 16:59 <+bridge> [ddnet] can we push our glue code there, as well? 16:59 <+bridge> [ddnet] glue code? 16:59 <+bridge> [ddnet] @onby 16:59 <+bridge> [ddnet] yea, glue code from the other side 16:59 <+bridge> [ddnet] the code was fucking entangled πŸ˜› 16:59 <+bridge> [ddnet] like the code that connects the 16:59 <+bridge> [ddnet] lol 16:59 <+bridge> [ddnet] well it'd be nice if you could use the .so on your servers aswell @onby 16:59 <+bridge> [ddnet] yes heinrich made stuff a lot cleaner in the interface 17:00 <+bridge> [ddnet] lol 17:00 <+bridge> [ddnet] @Learath2 private repo when 17:00 <+bridge> [ddnet] and at some point i wana use wat he did 17:00 <+bridge> [ddnet] on blocker at least, fng is a different repo cus laser stuff 17:01 <+bridge> [ddnet] I mean I could try to help you with that code as well, if you want 17:01 <+bridge> [ddnet] so we can have one unified codebase 17:01 <+bridge> [ddnet] ❀️ 17:01 <+bridge> [ddnet] @onby what is your github name? 17:01 <+bridge> [ddnet] :heartw: 17:01 <+bridge> [ddnet] https://github.com/nobody-mb 17:02 <+bridge> [ddnet] @heinrich5991 you can push whenever 17:03 <+bridge> [ddnet] I have horrible rebound rhinitis and it's giving me headaches :/ 17:06 <+bridge> [ddnet] @heinrich5991 how could ddnet handle the main packet not arriving first? 17:06 <+bridge> [ddnet] Do you queue up the packets based on NETADDR or sth? 17:06 <+bridge> [ddnet] storing the players for that IP address 17:06 <+bridge> [ddnet] no 17:07 <+bridge> [ddnet] I see no easy way to do that 18:15 <+bridge> [ddnet] πŸŽ‰ 18:16 <+bridge> [ddnet] @heinrich5991 let me try building this on the server 18:16 <+bridge> [ddnet] see if it loads antibot null 18:16 <+bridge> [ddnet] @Learath2 I already modified stuff on ddnet.tw 18:16 <+bridge> [ddnet] go there plx 18:17 <+bridge> [ddnet] (only added flags, maybe to git clean if you want a clean slate) 18:17 <+bridge> [ddnet] ah, be careful with git clean I guess 18:17 <+bridge> [ddnet] πŸ˜„ 18:17 <+bridge> [ddnet] git checkout -- build.sh 18:18 <+bridge> [ddnet] I'm trying it out on ddnet.tw btw 18:18 <+bridge> [ddnet] just there for now 18:19 <+bridge> [ddnet] k πŸ™‚ 18:19 <+bridge> [ddnet] food 18:27 <+bridge> [ddnet] @heinrich5991 ddnet.tw:8370 now runs antibot null 18:44 <+bridge> [ddnet] @heinrich5991 all the servers are going to be running antibot null in a second, but there is an issue 18:45 <+bridge> [ddnet] the server binary links to libantibot.so in the src folder, seems it is linked with absolute path, you need to do sth there to not do absolute paths but I'm no dynamic linkingwizard 18:47 <+bridge> [ddnet] ```ddnetger ldd DDRace64-Server_sql | grep antibot 18:47 <+bridge> [ddnet] libantibot.so => /home/teeworlds/src/master-build/libantibot.so 18:47 <+bridge> [ddnet] (0x00007f174f4ff000)``` 18:58 <+bridge> [ddnet] @heinrich5991 other servers won't load the antibot or the debug message is somehow getting lost, I need to go 18:58 <+bridge> [ddnet] please take a look 18:59 <+bridge> [ddnet] uh oh xd 19:03 <+bridge> [ddnet] It compiled fine and I checked that it also linked fine and it can find the dynamic lib, checked it through ldd 19:03 <+bridge> [ddnet] And if I run the server manually it does load the antibot, however if i let the server restart it wont 19:03 <+bridge> [ddnet] Couldnt figure it out and had to leave 19:33 <+bridge> [ddnet] Is antibot also on 0.7 servers? πŸ™‚ 19:54 <+bridge> [ddnet] @ChillerDragon no. antibot isn't really on 0.6 either, it's just a test phase right now 19:55 <+bridge> [ddnet] the changes needed can be seen here: https://github.com/ddnet/ddnet/pull/2081 19:59 <+bridge> [ddnet] @heinrich5991 I think it broke something and I dont have my laptop with me, can you please take a look? 20:01 <+bridge> [ddnet] I only have a couple of minutes 20:01 <+bridge> [ddnet] @Learath2 restart doesn't work, you say? 20:02 <+bridge> [ddnet] Restart doesnt work but more importantly @nexus says votes are broken 20:02 <+bridge> [ddnet] ~~ 20:02 <+bridge> [ddnet] I think you should just roll it back if you dont have the time to diagnose 20:02 <+bridge> [ddnet] what to do to rollback? 20:03 <+bridge> [ddnet] ./build after checking out the commit? 20:03 <+bridge> [ddnet] Yeah votes are broken, i can't change map rn 20:03 <+bridge> [ddnet] @Gwendal server, port? 20:03 <+bridge> [ddnet] @heinrich5991 I think so, am not completely sure 20:03 <+bridge> [ddnet] ddnet ger 8309 20:03 <+bridge> [ddnet] @Learath2 change is applied everywhere? 20:03 <+bridge> [ddnet] jao tested with admin command and it didn't work aswell 20:04 <+bridge> [ddnet] looks like a crash on map change 20:05 <+bridge> [ddnet] will roll back 20:06 <+bridge> [ddnet] I think I have a build-fixup.sh there for this occasion 20:08 <+bridge> [ddnet] looks good, ty 20:08 <+bridge> [ddnet] @Learath2 what do I need to do after executing this script? 20:10 <+bridge> [ddnet] nothing, I guess 20:11 <+bridge> [ddnet] Can you check the script, im not a 100% sure if i do the copying 20:11 <+bridge> [ddnet] you do 20:11 <+bridge> [ddnet] checked the script 20:12 <+bridge> [ddnet] Thanks, had to leave urgently 20:12 <+bridge> [ddnet] @Gwendal ger2 should be fine now, can you check? maybe try twice 20:12 <+bridge> [ddnet] ok 20:12 <+bridge> [ddnet] 1st time didn't work 20:13 <+bridge> [ddnet] ok 20:13 <+bridge> [ddnet] 2nd worked 20:13 <+bridge> [ddnet] thanks! 20:13 <+bridge> [ddnet] nice, ty 20:13 <+bridge> [ddnet] k, empty servers restarted, should be good now 20:14 <+bridge> [ddnet] classic "didn't test the map change" bug from me 😦 20:14 <+bridge> [ddnet] sorry 20:14 <+bridge> [ddnet] I should add that to the test suite 20:14 <+bridge> [ddnet] I wonder what the crash is, you dont seem to change anything relevant 20:14 <+bridge> [ddnet] the server crashes after the map change 20:14 <+bridge> [ddnet] probably some data structure in the antibot that thinks some player is still there 20:16 <+bridge> [ddnet] will take a look tonight, have to leave now 20:21 <+bridge> [ddnet] ye it just go back on the map that was here before voting 20:21 <+bridge> [ddnet] and it says u got timeout