03:48 < ddnet-commits> [ddnet] BannZay opened pull request #533: Load Current Map button added (master...openCurrentMap) https://git.io/v69sY 03:56 < ddnet-commits> [ddnet] BannZay opened pull request #534: dCopyMoves disabling when Dummy disconnecting (master...disabling-dCopyMoves-after-disconnect) https://git.io/v69sz 08:09 < ddnet-commits> [ddnet] def- pushed 2 new commits to master: https://git.io/v69E4 08:09 < ddnet-commits> ddnet/master d78c565 BannZay: dCopyMoves disabling when Dummy disconnecting 08:09 < ddnet-commits> ddnet/master 5b41991 Dennis Felsing: Merge pull request #534 from BannZay/disabling-dCopyMoves-after-disconnect... 11:20 <+Ryozuki_> !seen timakro 11:20 <@Nimda> I've last seen timakro 11 days, 19 hours, 40 minutes and 29 seconds ago in #ddnet saying "hi". 11:21 <+Ryozuki_> !help 11:23 <@deen> hi Ryozuki_ 11:23 <+Ryozuki_> hi 11:23 <+Ryozuki_> i'm making a fifo bot with python 11:23 <+Ryozuki_> and remember the !seen 11:23 <+Ryozuki_> as it read logs it would be possible to make it ^^ 11:24 <+Ryozuki_> i think 11:43 <@deen> cool, i think i also made a fifo bot some time ago 11:43 <@deen> well, the games in ddnet-scripts also work like that 11:48 <+Ryozuki_> i've made a command that it's a calculator, and you can use the python math module :o 11:50 <+Ryozuki_> https://github.com/Ryozuki/PyBot :P 11:52 <@heinrich5991> Ryozuki_: you can take over the computer with that eval 11:53 <+Ryozuki_> mmm how exactly 11:53 <+Ryozuki_> running exit() doesn't work 11:53 <+Ryozuki_> if u want to test it come to my server 11:54 <@heinrich5991> __import__('subprocess').check_call('ls') 11:54 <+Ryozuki_> it says Result: 0 11:54 <+Ryozuki_> xD 11:54 <@heinrich5991> yes, it called the ls binary on your computer 11:54 <@heinrich5991> I can call any binary (and do a lot more) 11:55 <+Ryozuki_> on console i didn't see anything weird 11:55 <@heinrich5991> __import__('subprocess').check_output('ls') 11:55 <@heinrich5991> try that 11:55 <+Ryozuki_> oh 11:55 <+Ryozuki_> Python.py\\README.md 11:56 <@EastByte> never use eval 11:56 <+Ryozuki_> PyBot.py* 11:56 <@heinrich5991> what EastByte says 11:56 <@heinrich5991> especially not for user-given input 11:56 <+Ryozuki_> and what other way i can convert a string to a operation? 11:57 <+Ryozuki_> meh 11:57 <+Ryozuki_> i could filter out __import__ 11:57 <@heinrich5991> that's the wrong approach. I did that because it was the easiest 11:58 <@heinrich5991> you can't filter out everything. a safe way of doing this would be parsing the expression yourself 12:01 <@heinrich5991> http://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html 12:02 <@heinrich5991> that's a fun article I found a few years back 12:04 <@heinrich5991> Ryozuki_: maybe something like this could work: https://newville.github.io/asteval/index.html 12:04 <@heinrich5991> (haven't researched whether it's safe) 12:04 <+Ryozuki_> ast.literal_eval(node_or_string) 12:04 <+Ryozuki_> python says that is safe 12:05 <@heinrich5991> yes, but that's just numbers and strings AFAIK 12:05 <@heinrich5991> so 1+2 doesn't work already 12:05 <@heinrich5991> oh, it does 12:05 <@heinrich5991> yea, then it should be fine 12:06 <@heinrich5991> but 1*1 already doesn't work 12:06 <@heinrich5991> so not very useful 12:06 <+Ryozuki_> yea :c 12:07 <+Ryozuki_> i'll try what u sent 12:09 <@EastByte> maybe there is some math lib you can use to parse and resolve the expression 12:10 <+Ryozuki_> asteval works perfectly thanks 12:10 <@heinrich5991> (you still have the problem that every user can DoS the bot, but at least they can't take over your computer anymore) 12:10 <+Ryozuki_> it also has functions from math module 12:10 <+Ryozuki_> hmm 12:11 <@heinrich5991> 2**2**2**16 12:11 <+Ryozuki_> that doesn't work 12:11 <+Ryozuki_> but 2**2 yes 12:12 <@heinrich5991> huh? it doesn't work? what happens? 12:12 <@heinrich5991> it should take up all of the CPU time 12:13 <+Ryozuki_> fck 12:13 <+Ryozuki_> why u didnt told me before xD 12:13 <+WolfAlex_> xD 12:13 <+Ryozuki_> oh fixed 12:13 <+Ryozuki_> but doesnt look like 12:13 <+Ryozuki_> it returns None 12:13 <+Ryozuki_> on the chat 12:13 <@heinrich5991> mh 12:14 <@heinrich5991> weird. anyway, it shouldn't be hard to craft an expression that takes ages to evaluate 12:14 <@heinrich5991> haven't seen that asteval protects against that 12:15 <+WolfAlex_> while True: pass 12:16 <+Ryozuki_> it loads cpu to 88% for 4 secs then returns none 12:17 <@EastByte> does asteval have some sort of time limit? 12:17 <+Ryozuki_> maybe 12:19 <+Ryozuki_> there is a way to limit python cpu usage? 12:20 <+Ryozuki_> if can be done from code even better 12:20 <@EastByte> how about leaving out the calc command instead :p 12:20 <+WolfAlex_> Ryozuki_: how does your getname work? xD 12:20 <+Ryozuki_> xd 12:20 <+Ryozuki_> on log 12:20 <+Ryozuki_> it has five : before ur name 12:20 <+WolfAlex_> ah 12:21 <+Ryozuki_> so i find each them until i get to the name and then a rfind for the : after ur name 12:21 <+WolfAlex_> what if i'm "wo:lf" 12:21 <+Ryozuki_> yep :s 12:21 <+Ryozuki_> but i don't know other way for the moment 12:23 <@heinrich5991> WolfAlex_: I don't think you can have a colon in your name on IRC 12:24 <+WolfAlex_> isnt this for teeworlds? 12:24 <@heinrich5991> oh 12:24 <@heinrich5991> I dunno 12:24 <@heinrich5991> Ryozuki_: you can set a timelimit in the Interpreter constructor of asteval 12:26 <+WolfAlex_> heinrich5991: look at line 23+, for teeworlds :D 12:27 <@heinrich5991> =) 12:37 <+Ryozuki_> hmmm 12:42 < ddnet-commits> [ddnet] def- pushed 1 new commit to master: https://git.io/v69Fx 12:42 < ddnet-commits> ddnet/master d3f04a9 Dennis Felsing: Remove accidental code 12:51 <@deen> anyone tested the new CHN server yet? 12:52 <@deen> I set it up but no time to check if it's working^ 12:55 <@heinrich5991> deen: what does testing that involve? 12:57 <@deen> playing there?^ 12:58 <@heinrich5991> ah 13:00 <+WolfAlex_> XD Ryozuki_ 13:00 <+Ryozuki_> omg xD 13:01 <+Ryozuki_> what u did 13:01 <+Ryozuki_> exactly 13:01 <+WolfAlex_> renamed myself to "; shutdown ;" 13:01 <@heinrich5991> haha 13:01 <+Ryozuki_> oh god 13:01 <@heinrich5991> I didn't even think about that direction 13:01 <+Ryozuki_> this is getting hard 13:02 <+Ryozuki_> i can filter that 13:02 <+Ryozuki_> or not 13:02 <@heinrich5991> btw, that's similar to what an SQL injection is, if you heard about that 13:02 <@heinrich5991> you can quote the player's names 13:02 <+Ryozuki_> didn't 13:02 <+Ryozuki_> oh 13:03 <@heinrich5991> (the same problem appears for the result of the calculation btw) 13:04 <+Ryozuki_> wolf come and try again 13:04 <+Ryozuki_> omg 13:04 <+WolfAlex_> x) 13:06 <+Ryozuki_> try again 13:46 <+Ryozuki_> is there a way to get name of someone with a id with fifo? 13:53 <@deen> probably not easily. maybe change the output format for log instead? 13:53 <@deen> with servers you can do "status" and parse that, but meh 13:56 <+Ryozuki_> to change the format i would needto change the server right? i want it to be compatible with standard ddnet server 13:56 <+Ryozuki_> ill try the status 13:57 <@deen> right 13:57 <@deen> well, maybe you can just make the output format more reasonable and then we can add it to standard ddnet too ;) 14:00 <+Ryozuki_> :o 14:04 <+Ryozuki_> deen what is actually the -2 on logs? 14:06 <@deen> "no player" or something 14:06 <@deen> maybe global server messages or team messages 14:06 <+Ryozuki_> [16-08-23 13:42:24][chat]: 0:-2:NAME: xD 14:06 <+Ryozuki_> oh maybe team chat 14:07 <@deen> player with ID 0 writes to chat with ID -2, yeah, probably team chat 14:19 <+WolfAlex_> Ryozuki_: https://pastebin.com/0d2nFCQf 14:20 <+WolfAlex_> but does not work if the player got ": " in its name 14:32 <+WolfAlex_> Ryozuki_: i've changed (?P.+) into (?P.{,15}) 15:07 <@heinrich5991> EastByte: https://eastbit.net/public/tw-webgl/?map=https://heinrich5991.de/teeworlds/maps/maps/dm1_0d2db620.map 15:07 <@heinrich5991> this doesn't work :/ 15:07 <@deen> heinrich5991: what 15:07 <@deen> 's bad about uploading the html/js on your server? 15:08 <@heinrich5991> I'd have to do it. and update it when east releases a new version. mhhhh 15:08 <+WolfAlex_> deen: heinrich5991 then has to update manually 15:09 <@deen> and tw-webgl is commonly updated? did I miss the updates in the last 3 years?^ 15:09 <@heinrich5991> :P 15:12 <+WolfAlex_> just in case :D 15:12 <@deen> especially for webgl running stuff from another server sounds dangerous for the user 15:13 <@deen> there are probably many webgl security vulnerabilities 15:14 <@heinrich5991> probably. but the browser shouldn't know that it's from a separate domain, it's just getting the map file from there 15:14 <@heinrich5991> but maybe it's still some cross-site restrictions at work here 15:15 <@heinrich5991> Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://heinrich5991.de/teeworlds/maps/maps/dm1_0d2db620.map. (Reason: CORS header 'Access-Control-Allow-Origin' missing). 15:15 <@heinrich5991> says the console 15:21 <@heinrich5991> ah, enabling cross-origin sharing for /teeworlds/maps/maps/*.map fixes the problem 15:22 <@heinrich5991> (link works now) 15:24 <@deen> cool 15:34 <@EastByte> Yep 16:10 <+Ryozuki_> heinrich5991 it pop ups a message saying failed to initialise webgl 16:11 <@heinrich5991> that's probably a problem on your side, or intentional behavior if you disabled webgl 16:11 <+Ryozuki_> hmm 16:12 <@heinrich5991> do you have noscript? 16:13 <@heinrich5991> what OS are you on? 16:13 <@heinrich5991> https://www.teeworlds.com/forum/viewtopic.php?pid=118957#p118957 16:15 <+Ryozuki_> "WebGL: Unavailable" 16:16 <+Ryozuki_> using chrome 16:16 <@heinrich5991> what OS are you on? 16:16 <+Ryozuki_> and latest gpu drivers 16:16 <+Ryozuki_> windows 10 16:16 <@heinrich5991> mh 16:16 <+Ryozuki_> i also have ubuntu 16:16 <+Ryozuki_> didn't tried there 16:16 <@heinrich5991> it should also work on windows 16:16 <+Ryozuki_> well 16:16 <+Ryozuki_> "Graphics Feature Status Canvas: Software only, hardware acceleration unavailable Flash: Software only, hardware acceleration unavailable Flash Stage3D: Software only, hardware acceleration unavailable Flash Stage3D Baseline profile: Software only, hardware acceleration unavailable Compositing: Software only, hardware acceleration unavailable Multiple Raster Threads: Unavailable Native GpuMemoryBuffers: Software only. Hardware acceleration disab 16:16 <@heinrich5991> mh. no idea. I guess you can't load other webgl sites either? 16:17 <+Ryozuki_> hardware acceleration doesn't work? 16:17 <+Ryozuki_> hm 16:19 < Ryozuki_> fixed it 16:20 <@heinrich5991> cool 16:20 <+Ryozuki_> but i can't load other maps 16:20 <@heinrich5991> huh? 18:49 <+Ryozuki_> https://github.com/def-/nim-unsorted/blob/master/amb.out xD 18:49 <+Ryozuki_> i think this face fits perfectly ( ͡° ͜ʖ ͡°) 20:33 <@Nimda> Shotsky by Im 'corneum just released on Solo at 2016-08-23 20:30 22:35 < asd_> hey 22:36 <+asd_> I want create ddrace server but i can't. is there anyone who help me? 22:37 <@deen> asd_: hi 22:37 <@deen> asd_: what's the problem? 22:37 <@deen> and what do you want exactly? 22:37 <@deen> are you on windows? do you want to run a server to test your own maps? 22:37 <@deen> or are you on linux and want your server to be online for everyone forevermore? 22:38 <+asd_> I want to play my friend. I want to vote all maps. I can change maps through "autoexec_server" but it takes so long 22:39 <+asd_> I am using win 10 22:40 <+asd_> I entered "https://ddnet.tw/downloads/" this web site and downloaded ddnet client & server and maps and then what should i do? 23:03 <@deen> asd_: like this: https://github.com/ddnet/ddnet-maps 23:03 <@deen> You copy the DDnet-Server.exe to the maps directory and start it 23:03 <@deen> then you can vote 23:11 <+asd_> i did deen. Thank you very much. you are good man :) 23:12 <@deen> have fun :)