SRL Archive - First Scripts

Auto Updating Script/Function


mixster

2008-01-05 16:50:33

After reading omgh4x0rz 'Scar, files and the internet' tutorial, I decided to set myself a small task of setting up a piece of script that lets you automatically update a script. After about 2 hours of coding (both scar and php) I managed to string together a few simple scripts that do the job quite nicely. I also converted it into both a whole script and also a function (both in separate files) but both work with the same php file.

The main workings behind it is that the scar script (the script that will be downloaded) is placed into a text file. That file is then written into a string in the php script and then echo'ed (written). The echo is then recorded by scar into a string and is then written over the old file. There is also the option of enabling/disabling browsers ability to view the script and also an option for making a backup when updating the script (in case something goes wrong or the newest version has bugs etc.). Also, it can be used to install scripts as it writes them rather than just editing them.

Download one or both of the scar files (depending in whether you want the function or whole script version) and both the txt files (auto-update.txt has to be changed to .php as the forum won't let me upload it with a .php extension :()

If you run into any problems or tips on improving it, please reply here or send me a pm.

(Ironically, at the moment there isn't an auto-updating script/function for this script :p)

Update: Finished the auto-installer. It's still being tested just to make sure it works and will be uploaded shortly. Also made it so the php file reads .scar files, so you don't have to copy and paste your script into a text file.
Update2: Please re-download if you have the original scripts. Came accross a bug, but not sure whether or not it's present in the original scripts, so better ot be safe than sorry. Also The auto installer is now very nearly finished and should be up in the next 20 or so minutes
Update3: Auto installer was getting a bit complicated so I worked on improving the function auto updater. You can now use it to update multiple files easily and can also include it then use it in a script.
Update4: Auto installer initially complete. Comes with an easy to use and straightforward form. Only known bug at the moment is that if you choose to do a backup when the file doesn't exist it crashes (just go to the main() function at bottom and turn the last option to false instead of true then run the script and swap it back). The update script is based off the my latest auto update function script. Also, I plan on only updating the auto installer for a bit. I plan to make it able to create multiple updaters at once, all still accessible through the 2 main files then the uploaded scar files

mickaliscious

2008-01-05 17:18:03

Nice, I will take a look.

P1nky

2008-01-05 20:52:59

wow looks cool ima look to it soon but idk you have 3 posts and it seems something fishy here… *GET HARRY OVA HERE TO CHECK lol master keylogger searcher*

skatemore40

2008-01-05 21:12:46

this is very good dude im gonna check it out again =P

mixster

2008-01-06 06:30:38

I come to the forums to check out the tutorials. If I make something useful after learning something new, then I'll post it up.
Also currently working on making an installer for it using a form to put in the information in then writing it into the 2 needed files and then you just upload the php file and your script.

Edit: Just about finished the installer, just testing it now. Check 1st post.

MylesMadness

2008-01-06 09:15:09

I'm going to use this thing. Maybe slightly modified but I'll still give credit.

mixster

2008-01-06 09:46:51

If any modifications you're going to do would be beneficial to anyone else who uses it, then please share. It's only me writing it, so I need more ideas of what to add on and what needs improving etc.