Maybe i've got it wrong, you're asking why you can't specify the exact same port as LFS is listening on as the port for responses in the ISI packet when you run everything on the same machine? Because it would make LFS send packets to itself.
Just like MonkOnHotTinRoof says, using 0 will make LFS respond to the originating port of the incoming packet, which is of course completely different from LFS' listening port.
It's definitely not the code missing some else's, the fact that PHP gets stuck suggests some kind of lengthy timeout for fopen, maybe related to using an url to open the file, but it still shouldn't consume any noticeable amount of cpu.
Why do you want to open the file through an url? Why do you want to manually read an ascii text file as binary? Why are you not using the apache php module?
A script is a computer program, "making" a script is essentially the same as writing a computer program. The difference between "programming" (C++) and "scripting" (PHP) is that the script is not compiled to machine code (.exe), it's instead read and run by another program, the script interpreter. Writing something simple in a scripting language is often easier then writing it in a compiled language, compiled languages usually require the programmer to handle memory management and datatypes, where scripting languages often convert types automatically and handles all memory stuff for you, at the cost of speed.
In my opinion, finding the vulnerability itself was the helping bit. "Finding out" that you can cheat / hack / modify a program is nothing new, but this particular exploit seems like quite a nasty multiplayer design problem which should really be looked into.
I guess what you're saying is the remedy suggested by n3o follows the rootkit type design and isn't something you'd like on your pc? This sounds much too extreme for LFS, i don't think it would be an apparent option for the devs.
Allocate all the standard LFS colors, print each character in the name separately with the current color.
colors = array ( 0 = imagecolorallocate( .. black ) 1 = .. red .. )
name = str_split(name) currentcolor = default color x = start x y = start y for (i = 0; i<=strlen(name); i++) if (name[i] == "^" && preg_match("/[0-8]/", name[i+1])) { currentcolor =& colors[i+1] i += 2 } imagestring(image, font, x, y, name[i], currentcolor) x += char spacing x }
Perhaps i am, i don't feel like this is such a big deal tbh, LFS is still in alpha and i'm not surprised these kinds of exploits are still around. I'm sure it'll be fixed and all will be back to normal.
I've got a similar analogy, not really a reply to your post, but here goes.
Which situation would make you prioritize the issue most, a friend calling you saying your car is unlocked but he'll protect it until you've got time, or reading that your car is unlocked in the morning paper? Not saying it's a good way of making sure an issue gets priority, but its widely used and probably works. I'm not into anything like this so i couldn't say how i'd do it.
Angered peoples, you do realize that testing a piece of software for vulnerabilities is basically the only way of finding and fixing them? There's a reason for exploit testing software such as Nessus being available.
Would you rather have n3o finding this sort of stuff and keeping it for himself? would be alot "smarter" to keep this a secret and then get to the top of the MHR by cheating as little as possible.
You also do realize that even if n3o is a skilled programmer, he's probably not the greatest programming genius that ever lived and hasn't spent four years working day and night on this, meaning this sort of exploit could probably be (quite easily) found by other people too, fixing it would be very beneficial for LFS.
In my opinion, n3o has helped Scawen find a serious exploit, meaning Scawen had time to work on the updated track selection menu instead of looking for obscure exploits.
I drove each car using [default] or [hard track] down the drag strip until hitting high revs in top gear (or running out of drag strip), dropped into 1st and held the car straight, after letting the car slow down i tried to drive back to the start and gathered some "damage ratings", totaled meaning the car could no longer move under its own power.
UF1 - totaled
XFG - heavy
XRG - very light
RB4 - very heavy
FXO - extreme
XRT - moderate+
LX4 - moderate
LX6 - light
RAC - very light
FZ5 - ~none
UFR - heavy
XFR - heavy
MRT - very light
FOX - light
FO8 - very light
BF1 - ~none
FXR - totaled
XRR - totaled
FZR - ~none
Engine fix (twice!) in 0 seconds, online / in race.