Hello all,
The next version of Firewolf will have HTTP support, and I'm setting up PHP scripts/web servers to host, upload, download, list, ect… the files. The PHP is going well and everything is working so far - I'm learning a lot!
After hearing quite a few bad tales about troubles CCFan11 had with his HTTP support in Rednet Explorer, I really don't want to have to go through the same thing. I have come up with a few ways I can think of that should help prevent malicious viruses and scripts, but as I know very little about the internet/viruses compared to most of the people on these forums, I need advice about how to prevent bad things from happening.
Ideas I had so far:
- Disallow uploading of files containing * and %
- Replace . with something like %dot%
- Add a .php extension
- Surround the lua code with a simple PHP file:
<html>
<body>
<?php
$code = '
--
-- Your Lua code here...
--
';
print $code;
?>
</body>
</html>
The downloaded website would take little parsing to get the original Lua codeThe current Firewolf antivirus will also be in place with these websites, so Lua viruses shouldn't harm the user's computer too much.
I'm not sure about preventing spammers, but I was thinking about keeping records on IPs and only letting them from uploading/hosting servers once every 10 (not sure?) minutes.
I Appreciate any help!
Please keep in mind that I am noob at this (website hosting, FTP management, ect…) and only learnt PHP in the last hour :P/>