PDA

View Full Version : PHPLock



Jackbee
11-05-2007, 05:03 PM
Does anyone know who owns PHPLock.net?

the wombats
11-05-2007, 05:05 PM
tom i think. i think he's called tomm on here now.

Jackbee
11-05-2007, 05:30 PM
cheers +rep

QuickScriptz
11-05-2007, 07:09 PM
Funny how most of the *good* up-to-date php scripts/stuff creators have an account of HxF eh?

lol - yes im canadian ;)

Dentafrice1
11-05-2007, 07:39 PM
I didn't know PHPLock was even still active..

Sygon..
11-05-2007, 07:54 PM
PHPlock is a very simple script - i may create my own.

Dentafrice1
11-05-2007, 07:55 PM
It just uses file_get_contents I believe... and if it don't pass it then it exit;'s

Florx
11-05-2007, 07:56 PM
It just uses file_get_contents I believe... and if it don't pass it then it exit;'s
Isn't that easy to remove the line of code and then it will work?

Splinter
11-05-2007, 07:58 PM
The idea is its for encoded scripts I suppose..

Jackbee
11-05-2007, 07:59 PM
well I've bought it and im waiting for it to be sent...

Florx
11-05-2007, 08:01 PM
I hate encoded scripts.

BUT I suppose anyway someone tries to make things need a license someone else will produce a 'nulled' version.

Even Vbulletin can't stop it!!!

Sygon..
11-05-2007, 08:02 PM
It just uses file_get_contents I believe... and if it don't pass it then it exit;'s

Yeh check if servers up using fsockopen - then like liscence.php?liscenceid=1&liscencenumber=1

then it gets the contents of it and if it says yes or what ever the liscence is valid bla bla.

Dentafrice1
11-05-2007, 08:03 PM
Pretty much, unless you encrypt it ;)




<?
// Simple thingy
// Coded in quick reply box so its probably bad

$server = $_SERVER['SERVER_NAME'];
$when = date("r");
$response = file_get_contents("http://lockplace.com/lock/lock.php?server=$server&time=$when");

if($response == "active") {

}else{
if($response == "expired") {
echo "Your license has expired";
exit;
}
if($response == "suspended") {
echo "Your license has been suspended";
exit;
}
if($response == "none") {
echo "Are j00 stupid, you don't even have a license for this domain";
exit;
}

}
?>


Thats pretty much it for the check script, you still need to write the lock.php

I will make one of these tonight or tomorrow

Jackbee
11-05-2007, 08:09 PM
so your saying i've wasted my money? :(

Dentafrice1
11-05-2007, 08:09 PM
Pretty much, maybe tomm will give you a refund. If so I will make you one.

Splinter
11-05-2007, 08:40 PM
so your saying i've wasted my money? :(

How much did you pay? Also im interested in what use you have for the script.

Dentafrice1
11-05-2007, 08:42 PM
How much did you pay? Also im interested in what use you have for the script.
15 Pounds.

Splinter
11-05-2007, 08:47 PM
15 Pounds.
Oh My God.

timROGERS
11-05-2007, 09:00 PM
Oh My God.

You do get a complete admin panel though :P

Dentafrice1
11-05-2007, 09:11 PM
True but for a very simple script..

Splinter
11-05-2007, 09:16 PM
Plus you are safer to use your own licensing script because if you can break the license with one script then it can be used on everyone that uses PHPLock.

Xotuako
11-05-2007, 09:40 PM
Plus you are safer to use your own licensing script because if you can break the license with one script then it can be used on everyone that uses PHPLock.Last night I had an idea to make one - a very simple one mind you - because I can't code in PHP very well, I've only been learning a little, I might start coding now, I already made the SQL xD

today
11-05-2007, 09:56 PM
make it good, free, and give us it :]

Jackbee
12-05-2007, 04:05 PM
I've asked for a refund.

Xotuako
12-05-2007, 04:25 PM
make it good, free, and give us it :]
I'll try, yes it'll be free, and yes I'll share it :P

It wont be great, cos I can't code great, but it'll do it's job... it wont be all snazzy like the PHPLock one - but mine will be free :P

No promises that I'll finish it because I *am* still learning!

Tomm
12-05-2007, 06:21 PM
Its more advanced that the script posted ;)

I won't go into detail but it uses tokens and encrypts certain things and does not just say "active" or anything like that (It does not sent any readable text).

Xotuako
12-05-2007, 07:04 PM
Its more advanced that the script posted ;)

I won't go into detail but it uses tokens and encrypts certain things and does not just say "active" or anything like that (It does not sent any readable text).
It has a nice admin panel ^^

Blob
12-05-2007, 07:08 PM
It has a nice admin panel ^^

I made the layout ^_^

Xotuako
12-05-2007, 07:12 PM
I made the layout ^_^
I like that layout it's nice :D

Tom, did you give him a refund?

And mine wont be very good, it'll be super simple and pretty vulnerable I'd say :P If I decide to continue.

Toms is good, and nice layout Blob, +rep to both! (Must spread for blob).

Blob
12-05-2007, 07:13 PM
I like that layout it's nice :D

Tom, did you give him a refund?

And mine wont be very good, it'll be super simple and pretty vulnerable I'd say :P If I decide to continue.

Toms is good, and nice layout Blob, +rep to both! (Must spread for blob).

Ty +Rep Back

Gotta spread soz

Florx
12-05-2007, 07:42 PM
Can we have a look at the coding please :)


EDIT: only joking :)

Dentafrice1
12-05-2007, 07:43 PM
I posted a simple one ;)

I didn't go into anything deeper then just that.

Blob
12-05-2007, 07:44 PM
I posted a simple one ;)

I didn't go into anything deeper then just that.

Cool give me a link

Offtopic:

Your name is nearly toothpaste in a diff language (it needs to be Dentifrice)

Dentafrice1
12-05-2007, 07:49 PM
Yep, I knew that.

Dentifrice (Denti being the latin prefix for tooth, frice for paste)

Dent EEE frice vs Dent UHHHH Frice

I am southern so down here we say, Dentuhfrice

Sygon..
12-05-2007, 09:10 PM
Its more advanced that the script posted ;)

I won't go into detail but it uses tokens and encrypts certain things and does not just say "active" or anything like that (It does not sent any readable text).

Yeh but at the end of the day if the file is encoded or whatever why does it matter, unless you give out the liscencing link and the get variables or whatever.


I posted a simple one ;)

I didn't go into anything deeper then just that.

You did what was needed, nothing more "advanced" is needed really.

And 15pounds, IMO is quite expensive, but profitable hehe :)

Dentafrice1
12-05-2007, 09:55 PM
Yeah, its a simple way of protecting something.

Nothing more is really needed. You could make it output 1, 2, 3 or any number and

if($response == "1") {
do something
}

and so on.

bad-dj
12-05-2007, 11:28 PM
Pretty much, unless you encrypt it ;)




<?
// Simple thingy
// Coded in quick reply box so its probably bad

$server = $_SERVER['SERVER_NAME'];
$when = date("r");
$response = file_get_contents("http://lockplace.com/lock/lock.php?server=$server&time=$when");

if($response == "active") {

}else{
if($response == "expired") {
echo "Your license has expired";
exit;
}
if($response == "suspended") {
echo "Your license has been suspended";
exit;
}
if($response == "none") {
echo "Are j00 stupid, you don't even have a license for this domain";
exit;
}

}
?>
Thats pretty much it for the check script, you still need to write the lock.php

I will make one of these tonight or tomorrow

Cool when are you going to make the lock.php???

Dentafrice1
13-05-2007, 12:00 AM
I will make a simple one tonight, deal?

Won't be encoded or nothing.

bad-dj
13-05-2007, 12:09 AM
Ok cool thank you.

All the people who use it, will have to give you thanks for your time.

Dentafrice1
13-05-2007, 12:58 AM
Here is a Sample config file for the people using the system (customers);



<?
// Sample Config
include "licensing.php";

$server = "localhost";
$username = "this_username";
$password = "1337";
$database = "test";


// License
$key = "wafr5156dsf1a561";
?>


Here is licensing.php (to be included in the config file):



<?
// Simple thingy
// Coded in quick reply box so its probably bad
include "config.php";
$server = $_SERVER['SERVER_NAME'];
$when = date("r");
$response = file_get_contents("http://lockplace.com/lock/lock.php?server=$server&time=$when&key=$key");

if($response == "active") {

}else{
if($response == "expired") {
echo "Your license has expired";
exit;
}
if($response == "suspended") {
echo "Your license has been suspended";
exit;
}
if($response == "none") {
echo "Are j00 stupid, you don't even have a license for this domain";
exit;
}

}
?>


Lock.php


<?
// LockIT
// lock.php V1.0

include "config.php";

$server = $_GET[server];
$time = $_GET[time];

$serverq = mysql_query("SELECT * FROM license WHERE server='$server'");
$servern = mysql_num_rows($serverq);

if($servern == "0" || $servern == "") {
echo "none";
exit;
}

$licenseq = mysql_query("SELECT * FROM license WHERE server='$server' ORDER BY id DESC LIMIT 0,1");
$licenser = mysql_fetch_array($suspendq);
if($licenser[status] == "active") {
echo "active";
exit;
}else{
if($licenser[status] == "suspended") {
echo "suspended";
exit;
}

$today = date("r");
if($licenser[expire] == "$today") {
mysql_query("UPDATE license SET status='$suspended' WHERE id='$licenser[id]' LIMIT 0,1");
echo "expired";
exit;
}
}
?>


Config.php



<?
// http://www.calebmingle.com

$server = "localhost";

$username = "";

$password = "";

$database = "";

mysql_connect($server, $username, $password);

?>


SQL:



CREATE TABLE `license` (
`id` int(10) NOT NULL auto_increment,
`server` text NOT NULL,
`expire` text NOT NULL,
`key` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;


Sample license:


INSERT INTO `license` VALUES (1, 'www.calebmingle.com', '', 'wafr5156dsf1a561');


Date should be in this format:
Sat, 12 May 2007 19:58:08 -0500

Kind of confusing, but if your smart you should be able to figure it out.

I whipped it up kind of fast.

bad-dj
13-05-2007, 04:04 AM
Cool thank you i will read the code when i get time and learn some thing from it.

bad-dj
13-05-2007, 05:50 AM
Sorry to 2 posted but could not edit my other post :S

Dentafrice dose not work i have a look at the code typed to fix it but i am stumped.

Xotuako
13-05-2007, 07:45 AM
This is an addon to what Dentafrice posted. It's so you can make licences/serials.

I am a newbie at PHP, it's only quick, and I've not been learning long. I've made the SQL too.



<?php
include "config.php";
if ($_POST[enter]) {
$serial1 = $_POST[serial1];
$serial2 = $_POST[serial2];
$serial3 = $_POST[serial3];
$serial4 = $_POST[serial4];
$query = mysql_query("INSERT INTO serial (serial1, serial2, serial3, serial4) VALUES('$serial1','$serial2','$serial3','$serial4' )");
echo "Serial has been made. The serial is ".$serial1."-".$serial2."-".$serial3."-".$serial4."";

}
else
{
echo ("<form method=\"POST\">
Serial1: <input type=\"text\" size=\"4\" maxlength=\"4\" name=\"serial1\"><br />
Serial2: <input type=\"text\" size=\"4\" maxlength=\"4\" name=\"serial2\"><br />
Serial3: <input type=\"text\" size=\"4\" maxlength=\"4\" name=\"serial3\"><br />
Serial4: <input type=\"text\" size=\"4\" maxlength=\"4\" name=\"serial4\"><br />
<input name=\"enter\" type=\"submit\" value=\"Submit\">
</form>");
}
?>
Save that as add.php

the SQL is



CREATE TABLE `serial` (
`id` int(11) NOT NULL auto_increment,
`serial1` varchar(4) NOT NULL default '',
`serial2` varchar(4) NOT NULL default '',
`serial3` varchar(4) NOT NULL default '',
`serial4` varchar(4) NOT NULL default '',
PRIMARY KEY (`id)
) TYPE=MyISAM;
If it doesn't work I'll try and fix. IT HAS NO SECURITY. So a good idea would be to delete the file from your site when you've added a licence, then re upload to a hidden location when you want to add another. But, it can only hold 4 characters in each, not enough for SQL injection?

I'll try making something so you can edit the licence/serial.

I've been learning for like 3 days, looking at tuts etc, and I can remember a lot, but usually get errors. :(

Xotuako

Recursion
13-05-2007, 07:49 AM
Or just use HTAccess on the directory...

Very usefull DF and Xblahblah-cant-remember-your-name ;)

Xotuako
13-05-2007, 07:58 AM
Or just use HTAccess on the directory...

Very usefull DF and Xblahblah-cant-remember-your-name ;)

Lol, thanks. It works I think, I don't have SQL on my bad host (good ones upgrading), but form works etc. Just can't find sql.

This is a good way to remember my name. In Spain, for short text they use an X as ch. So you'd pronounce my name Cho-too-ah-koh :P Or Cho-too-ah-ko

Dentafrice1
13-05-2007, 01:12 PM
It was just something simple, why make serials in its own table, each license has a field for a key:

`key` text NOT NULL,

;) AKA serial.

Xotuako
13-05-2007, 01:42 PM
It was just something simple, why make serials in its own table, each license has a field for a key:

`key` text NOT NULL,

;) AKA serial.
Hmm, I suppose so. Good idea. :P I might work on it, and edit things to make it better, I dunno.

If I do will you help me when I get stuck? You're a much better coder than me, so you'd know what to do xD

Dentafrice1
13-05-2007, 07:38 PM
Sure

add me on msn

hxfname at live . com

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