PDA

View Full Version : [REL] Giving away my php script updater xD



NN-Dom
01-08-2008, 04:19 PM
Yeh, its all got comments so you can easily work out what to do with it.
I re-wrote it all as my old coding was VERY messy compared to what it is now.
Hope you enjoy it, dom :)


<?php
/*
** ** || ** NO MIRRORS PLEASE ** || ** ** || ** ** || ** ** || ** ** || **
** Doms script updater V1
** Free release
** Please respect my time and leave the copyright as it is. Thanks
** Need support? eMail: [email protected]
** Need to report a bug? eMail? [email protected]
*/

//Delete the files below.
function delete($file) {
unlink($file);
}
// IF YOU DO NOT WANT TO DELETE ANY FILES, DO NOT UNCOMMENT THE BELOW. OTHERWISE, YOU MAY. Though, it is always better to start fresh.
//delete("error_log"); // Copy and paste more delete(""); functions for more files you want to delete

//Rebuilding the latest file
$create['filename'] = "testfile.php"; // Where testfile.php is the file you are creating, and "filename" is the filevar
$handler['filename'] = fopen($create['filename'], w); // Where $handler['filename'] is the file var, and $create['filename'] is the page from the last step
// Copy and paste them above changing the vars if you need more.

//Copy data from the latest files into the updating files

$updatefile['filename'] = "testfile.php";
$updater['filename'] = fopen($updaterfile['filename'], 'w') or die(" Could not open ".$updatefile['filename']."!");
///
// Get remote files //
//!! THE LATEST VERSION OF THE FILE MUST BE A .txt FILE!! !!\\
$testfiles = @file_get_contents("http://www.yoursite.com/path/to/latest/file.TXT");
fwrite($updater['filename'], $testfiles);
fclose($updater['filename']);

// Now, you should of guessed what to do with that like you did with the other steps (copy + paste + changevars)
?>
<center><b><a href='http://forum.truecrimegaming.com'>TCG PHP Script Updater.</a> || <a href='http://forum.truecrimegaming.com/showthread.php?p=93#post93'>Get it here!</a> </b></center>

Calon
01-08-2008, 05:16 PM
That's just terrible, and can be stopped by file permissions. Also, you've set a function for that which looks stupid.

Better luck making a un-useful script next time.

NN-Dom
01-08-2008, 05:21 PM
That's just terrible, and can be stopped by file permissions. Also, you've set a function for that which looks stupid.
Better luck making a un-useful script next time.


Look its free. It works. end of.

Jahova
01-08-2008, 06:25 PM
It could be useful to learn off?

RSTurbo
01-08-2008, 06:55 PM
That's just terrible, and can be stopped by file permissions. Also, you've set a function for that which looks stupid.

Better luck making a un-useful script next time.

CAN YOU EVER STOP ******* TALKING?
coz your so perfect no one else is and you have to have a answer for everything

Calon
01-08-2008, 07:19 PM
CAN YOU EVER STOP ******* TALKING?
coz your so perfect no one else is and you have to have a answer for everything
I'm not talking, I'm typing.

Smart alec.

NN-Dom
01-08-2008, 07:23 PM
BackOn Topic Please lads :)

Leetzgirl
01-08-2008, 07:34 PM
*Removed*

Edited by ,Jess, (Forum Super Moderator): Please do not be rude towards other forum members.

NN-Dom
01-08-2008, 07:51 PM
*removed*

Calon, do what he said ;) That way you wont get punched by your best mate.

Excellent
01-08-2008, 07:53 PM
Looks okay. Useful for new people. +rep.

Agnostic Bear
01-08-2008, 08:04 PM
That's just terrible, and can be stopped by file permissions. Also, you've set a function for that which looks stupid.

Better luck making a un-useful script next time.

This. This script has no practical use and is just stupid, why do you have a function for unlink when you can just unlink() the file you want, it's the same amount of chars for both delete and unlink, all in all, this script is stupid.

Calon
01-08-2008, 10:16 PM
This. This script has no practical use and is just stupid, why do you have a function for unlink when you can just unlink() the file you want, it's the same amount of chars for both delete and unlink, all in all, this script is stupid.
Thank you!
+REP

smurf-you
02-08-2008, 11:44 AM
thanks for script

NN-Dom
02-08-2008, 01:32 PM
thanks for script

Thankyou for the good commend, unlike the *******s above you ;)

Dentafrice
02-08-2008, 01:58 PM
Seriously, I sit here for five minutes thinking of the practical use for this.

#1, anyone could visit the URL and remotely put any file on your server, and potentially delete any file on your server.

#2, why would you want to grab a text file off of a server when you can just right click and create the file..

I just don't see any practical use in it, and there was no reason to create a function like was already said for a pretty pointless thing, unless you just liked looking at delete() better then unlink() [which is pretty sad]

You also made it seem in the title that we should be mighty thankful you are releasing this.. like it is world class coding..

And why the **** have you put almost every variable into an array, when you are only defining them once ($create['filename'] and $handler['filename']) when it really is a handle.. not a handler LOL.

Why couldn't you just name it $fileName and $fileHandle or something? Not put them into an array.. ;|

Then you do the same thing down below, which is ******* pointless..

NN-Dom
02-08-2008, 02:00 PM
and there was no reason to create a function like was already said for a pretty pointless thing, unless you just liked looking at delete() better then unlink() [which is pretty sad]

its becuase some people would know what delete() does, since its self explanitory, whereas unlink() would require a bit of help to know what you mean, if you get me.

-- And also, obviously you'd need to protect the script with some kind of admin system or somthin like that :)

Dentafrice
02-08-2008, 02:05 PM
Read my post above.. I explained more.

Then reply :|

Who gives a **** what people think about delete and unlink.. all you had to do is post a comment beside it.. along with the other 62654 comments..

Calon
02-08-2008, 02:30 PM
Rubbish script, more exploits than Nivade..

..and Nivade doesn't even have any exploits.

Invent
02-08-2008, 02:37 PM
..and Nivade doesn't even have any exploits.

It has some exploits. Not bad ones atm, but it definately has some :)

Calon
02-08-2008, 03:00 PM
It has some exploits. Not bad ones atm, but it definately has some :)
PM me them please? I haven't found any.

Calon
03-08-2008, 12:50 AM
It has some exploits. Not bad ones atm, but it definately has some :)
Lol, fixed.

(Couldn't edit above)

Agnostic Bear
03-08-2008, 03:33 AM
Seriously, I sit here for five minutes thinking of the practical use for this.

#1, anyone could visit the URL and remotely put any file on your server, and potentially delete any file on your server.

#2, why would you want to grab a text file off of a server when you can just right click and create the file..

I just don't see any practical use in it, and there was no reason to create a function like was already said for a pretty pointless thing, unless you just liked looking at delete() better then unlink() [which is pretty sad]

You also made it seem in the title that we should be mighty thankful you are releasing this.. like it is world class coding..

And why the **** have you put almost every variable into an array, when you are only defining them once ($create['filename'] and $handler['filename']) when it really is a handle.. not a handler LOL.

Why couldn't you just name it $fileName and $fileHandle or something? Not put them into an array.. ;|

Then you do the same thing down below, which is ******* pointless..

Thankyou so much for repeating what I said.

Dentafrice
03-08-2008, 01:50 PM
Considering the fact all you said was:


This. This script has no practical use and is just stupid, why do you have a function for unlink when you can just unlink() the file you want, it's the same amount of chars for both delete and unlink, all in all, this script is stupid.Just like Calon said.. I actually added the things wrong with it, idiot. Get the stick out of your *** and quit acting superior.

Agnostic Bear
03-08-2008, 02:54 PM
Considering the fact all you said was:

Just like Calon said.. I actually added the things wrong with it, idiot. Get the stick out of your *** and quit acting superior.

Hey you're the one getting annoyed not me, there's nothing actually wrong with that script and there's no way to exploit it "idiot", so kindly read the code next time before you start telling me what to do.

Want to hide these adverts? Register an account for free!