/hackpanel

API and Client for Hacks/Bybass creators

Primary LanguagePHP

Hackpanel

Hackpanel: API and Client for Hacks/Bybass creators

Hackpanel provides fast and easy way for Hacks/Bybass creators to control access to their apps using keys and HWID. to help them focus more on creating awesome hacks!


Screenshots of the admin panel

Screenshot1


Screenshot1


Screenshots of the simple clinet

Screenshot1


Screenshot1


Table of Contents


Introduction

This project aims to make it easier and faster for hack/bybass creators to control and manage access to their products, while focus more on creating the product itself.

The Story

I've got the idea when a One of my friends who was a PUBG bybass creator with such experience in C++ and Zero experience in APIs and Web, asked me to make a very simple key-based login system for his .Net Client.

Features


Installation

Clone

Clone this repo to your local machine using

git clone link

Setup

For Development

composer install
composer dump-autoload
php artisan key:generate
php artisan migrate --seed
php artisan passport:install

Client

navigate to Hackpanel example .net client


Usage

Documentation

First things first you need to request an Bearer Access Token for the client.

POST http://localhost:8000/oauth/token

Request Body

grant_type: password

client_id: 2

client_secret: use this command to generate a new client secret php artisan passport:install

username: admin@admin.com

password: admin

API

Login using Key

POST http://localhost:8000/api/keyLogin

Request Body

Key, Example: HAKPNLQJJJPSPZZVF72Y

[hwid]: optional if the key is only for one PC, Clinet will generate it in the first successful login.

Example: E5A9-1724-3D5F-1E48-E6B1-A98A-9B98-DDD6

access_token: send with every login request to id the app.

Example:wBXMGfw1GSsgzpUdTSBaW55ttp7vVCZ9QVmWis6xXiVbYBEPkOILLS3zrPeU


Fetching data

using laravel awesome Route::resource() you can get all possible routes using this command php artisan route:list

Client

Hackpanel example .net client handles every request using ApiHandler.cs library.

public ApiHandler(string apiToken, string appToken, string apiUrl);

apiToken: Bearer Access Token

appToken: App access token

apiUrl: your-url.com/api

send POST request

 public dynamic post(string url, Dictionary<string, object> data);

send GET request

    public dynamic get(string url);

Some helper methods

    #get current app info in dictionary key-value pair
    public Dictionary<string, object> pairAppInfo();

    #get current app meta info in dictionary key-value pair
    public Dictionary<string, object> pairAllMeta();

    #login using key
    public Dictionary<string, object> Login(string key, string hwid, string token);

Special Note (Don't Read It Out Load!)

I don't have time for this, Skip to the important part!

Okay, one more thing before getting your hammer and start hammering on this little boy ;) that violates every OOP principle out there with poor documentation and low quality code.

Surprisingly! this little boy taught me a lot and I mean a lot, here is a list of what I learnt and what I'll continue to learn along the way of making America great again:

Writing (supposedly) a good Readme

Was it worth learning a new language!

  • C#: example .NET client took me 60 long hours of hard debugging .Net JSON tokens, Dictionaries and remembering that C# arrays doesn't behave as php arrays,scrolling in stackOverflow threads and documentations to just to know how to initialize a damn dictionary ;).

  • New Package manager: C# Nuget.

New Tools

  • Postman: Fun transition from boring Console.WriteLine(); debugging APIs responses using REST Client.

  • Code Generators: In the beginning I created every controller, model, view, transformer...etc manually, it was time consuming and duplicated code, I found the magic pill InfyOmLabs's Laravel Code Generator.

  • Datatables: Handling Datatables was a challenge after countless sleepless trail and error nights I learned that Laravel Code Generator is way cleaner and efficient.

  • PHPCS and PSR: Code standardization is a great deal in open source community, that I noticed some packages or even Laravel repo itself includes .phpcs which led me to the new world of PHP PSR, code standards, and prettify which by the way wasn't easy to configure.

  • PHP DocBlocks: Above every function there's a comment block that explains what it does right! but I didn't know it can generate a full api reference!

Git and Github Collaboration

  • I was solo old-school type developer since the beginning, one simple thing as deploying this project to DigitalOcean Droplet inspire me to learn Git just to use post-push-hook, then share this project, my thoughts and ideas with the community is a great opportunity to git more familiar with github.

Server Management

  • DigitalOcean: I'm a windows user, One of my favorite cloud hosting ever, browsing it's great detailed documentation helped me a lot to understand linux, apt, and some Nginx configurations.

Okay, What Next

I'm a believer of learning by example best way to learn anything is to know how it works then doit yourself so, this project was good chance to help friend run his illegitimate business :) then turned it into a learning journey where every step is an adventure itself, which wanted to share and inspire others like me who want some motivation, roadmap and cup of coffee to get things moving. so, what do I need from you? Please read Contributing section.


Contributing

To all of those who wanted to get involved this journey of learning and make america great again.

To get started...

Step 1

  • Take a quick look on Todo List
  • Open issue to share and discuses new ideas or features.

Step 2

  • Option 1

    • Fork this repo!
  • Option 2

    • Clone this repo to your local machine using git clone https://github.com/nagi1/hackpanel.git

Step 3

  • Do your thing, Hackaway.

Step 4


What's hides in the future

Todo List

  • Refactor the Key Login system into it's own package.
  • Implement Roles and permission.
  • Implement Multiple deletes in datatables.
  • Webhooks support.
  • Implement downloadable files.
  • Simple CMS to manage index page.
  • Rewrite API code base from scratch.
  • Rewrite example Client code base from scratch.
  • Apply some OOP principle.
  • Write Unit tests
  • Write DocBlocks
  • Rewrite this Readme File

Built Using


License

License