PHP Classes

class_lib.php

Recommend this page to a friend!

      Page encryptor  >  All threads  >  class_lib.php  >  (Un) Subscribe thread alerts  
Subject:class_lib.php
Summary:You function is broken.
Messages:7
Author:Nathan Lucas
Date:2010-11-13 17:26:43
Update:2010-11-18 22:39:56
 

  1. class_lib.php   Reply   Report abuse  
Picture of Nathan Lucas Nathan Lucas - 2010-11-13 17:26:43
The create_page function is broken. It is not returning a value.

<?php
function create_page($name,$type) {
$salt = 'default';
//use unusual encryption method to put off brute force crack attempts
$name = md5($salt).md5($name);
//use unusual string length to prevent hash type guesess
//use 31-59 length
$name = substr($name,5,38);
$result = $name.'.'.$type;


/** Should Add **/
return $result;
/** Should Add **/
}
?>

  2. Re: class_lib.php   Reply   Report abuse  
Picture of Alex Telford Alex Telford - 2010-11-13 19:15:16 - In reply to message 1 from Nathan Lucas
Cheers, I must have overlooked that when simplifying it.

I have updated it now. :)

  3. Re: class_lib.php   Reply   Report abuse  
Picture of Lethal Industry Lethal Industry - 2010-11-18 17:04:24 - In reply to message 1 from Nathan Lucas
Hi Alex i tryed ur function but i dont get it, it returns a link like this basdpajsdad35d5as87d6sa8d.php, r u saying that i most have a web page named like this?¡ Otherwise it doesnt work.

Can u help me please?¡

  4. Re: class_lib.php   Reply   Report abuse  
Picture of Alex Telford Alex Telford - 2010-11-18 19:14:24 - In reply to message 3 from Lethal Industry
Hi there

Yes it just returns the link.
you could add a function to create a webpage from a template using socket layers but that would be quite pointless.

you will need to create an instance of a class first to get the page name, then change/create the page to match. this is a one off change so when you look at the source code you can see $page->admin and people will see a random name.

this is used as part one of my ways to annoy hackers scanning your site for a directory tree.

if you have used acunetix on your site you will see every link on your site including some other links like test.php and admin.php if you obfuscate the page names a directory tree is useless to a hacker as they probably can't be bothered.

part 2 will be messing up the scanner interface.

part 3 will be shutting down the scanner completey.

however these aren't php atm so I can't post them haha.

hopefully this helps :)

NOTE: if you are sure hackers aren't going to try to hack your site, the these measures aren't necessary.
also you will need a dynamic robots.txt file to fit for googlebot blocking

  5. Re: class_lib.php   Reply   Report abuse  
Picture of Lethal Industry Lethal Industry - 2010-11-18 19:45:40 - In reply to message 4 from Alex Telford
Thx 4 ur answer Alex

I'm quite new in php, the concept is now clear but how i should create the instance to get the page name and then change/create the page to match?¡

  6. Re: class_lib.php   Reply   Report abuse  
Picture of Alex Telford Alex Telford - 2010-11-18 20:01:27 - In reply to message 5 from Lethal Industry
no worries
here is a link for oop in php if you need it :)
killerphp.com/tutorials/object-orie ...

you can create a page to show your links for your reference.
call it pqowieuryt.php or something.

<?PHP
//include path to ib
include('class_lib.php');
//initiate the class
$page = new page;
//print the pages.
echo 'about.php - '.$page->about.'\n';
echo 'contact.php - '.$page->contact.'\n';
echo 'contact.php - '.$page->menu.'\n';
?>
this is for your reference only and needs to be deleted after site is finished.
just change the sites names to match the output.
remember that index.php must remain index.php so your server can still access it :)

  7. Re: class_lib.php   Reply   Report abuse  
Picture of Lethal Industry Lethal Industry - 2010-11-18 22:39:56 - In reply to message 6 from Alex Telford
Perfect let me check the web.

Thx!!