I’ve been building leech sites for awhile now from scratch or with reused and rethought code.
When I decided that I need about 1000 leech spam sites that’s when I got the idea of building some sort of thing that can kinda generate everything I need and reuse templates and stuff.
So I started working on websiteMasterClient.php and decided to share it with the world.
I’m not going to get too non-technical about it. If you can’t understand it, meh xD
What you need first
An HTTP Server
nginx
apt-get install nginx
apache
apt-get install apache2
PHP5
apt-get install php5-fpm php5-sqlite
How to install
cd /path/to/http/server/index
git clone https://github.com/psyb0t/websiteMaster.php.git .
git submodule init
git submodule update
shell_exec needs to be enabled for file mime-type detection
How to use it
Expected input is a POST request containing raw JSON data structured as such:
{
"act": [act_name],
"data": [act_data_object]
}
The script returns a JSON response:
{
"status": [OK/ERROR],
"message": [the_message],
"data": [false/expected_data],
"content_type": [document_content_type]
}
The proper way to interact with websiteMaster.php is by websiteMasterClient.php.
The templates
The config.php file
This file consists of the wm_templateConfig() function which returns the template configuration options as an associative array.
Configuration declarations
required_data
This declaration specifies the requirements for a site’s template_data database entry content.
Each entry specifies the data type for each data object.
rewrite_rules
This declaration specifies the name of the arguments found in a URL which will get the values from the URL according to the regex pattern. If an argument is given and the pattern does not apply, an exception is thrown.
Remember that the order in which the rewrite rules appear in the configuration file is the order in which they are expected to appear in the URL path.
If rewrite_rules is is not used, for the http://example.org/homepage/theArgument/ URL the template will be passed the following data:
[url_data] => homepage/theArgument/
index.php
This is the template loader which will inherit the $_data array from the main core loader.
Here you start building the actual website template.
Check the project out on github for more info and examples https://github.com/psyb0t/websiteMaster.php