Download the PHP package peterujah/naughty-site-killer without Composer

On this page you can find all versions of the php package peterujah/naughty-site-killer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package naughty-site-killer

Is Your Client a Naughty Client?

~We don't like peace, we want problems always.~

Naughty Killer Class

Ah, the joy of building a website for a "naughty" client who refuses to pay after getting full access to their cPanel. Don't fret! Instead of chasing them down, just drop the NaughtySiteKiller class on their server as a failsafe. This class lets you send HTTP requests to perform some rather justifiable actions on their website—whether it's deleting files, creating fake templates, or obstructing their site's content. It's the digital equivalent of "you won't pay? Fine, enjoy your broken website.

Key Features:

  1. Authentication: Validates requests using Bearer or Basic token schemes.
  2. Token Generation: Generate tokens from a password for authentication purposes.
  3. Action Handling: Executes actions like kill (deletes files and self-destructs the script), template (creates template files and updates .htaccess) or execute (Execute a string as PHP code using eval function).
  4. Security: Ensures that requests are authenticated by comparing the hashed token value.

Installation via Composer:


Usage Examples

Simply place the NaughtySiteKiller class on their server as an insurance measure. It supports token-based authentication and various actions like deleting files, creating templates, and updating .htaccess securely.

1. Generating a Hashed Token

To authenticate requests, generate a token by hashing a password using the sha256 algorithm. This token will be used for all incoming HTTP requests.

Example:

Alternatively, you can directly hash the password:


2. Handling the Incoming Request

Place the NaughtySiteKiller handler on the public directory of the website where it can be accessed through HTTP requests. This handler will process incoming requests, validate the authorization token, check the requested action (kill, execute, template, kill-self), and execute the appropriate method.

Example Usage:

Note: Replace <your-secure-bearer-hashed-token-here> with the hashed token you generated in the previous step.


Payload Fields

The following fields can be included in the payload when sending a request:

Explanation of Fields:


Payload Requests Examples

Here are examples of how to send payload requests using curl for the different actions (kill, template, and kill-self), including the Bearer token in the header.

1. Kill Action Request (Deletes all files and creates template files)


2. Execute Action (Run custom code on the server—because we trust you)

The Execute Action allows you to send custom PHP code to be executed on the server. It's like a magic wand for your commands.

Output:

This will execute the PHP code and you will receive the following response:


Explanation:

3. Template Action Request (Creates template files and updates .htaccess)

Explanation:


4. Self-Key Action Request (Delete NaughtySiteKiller class and handler)

Explanation:


Notes:


Developer Responsibility:

The use of this class is solely the responsibility of the user/developer. The creator and contributors of this class disclaim any responsibility for abuse or damage caused by its misuse. Proper authentication, authorization, and input validation are mandatory to prevent unauthorized access and malicious usage. Any unauthorized use of this class is strictly prohibited and is the responsibility of the user.


All versions of naughty-site-killer with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package peterujah/naughty-site-killer contains the following files

Loading the files please wait ....