Skip to content

Instantly share code, notes, and snippets.

View InspectorGadget's full-sized avatar
☁️

RTG™ InspectorGadget

☁️
  • Kuala Lumpur, Malaysia
View GitHub Profile
@InspectorGadget
InspectorGadget / run.py
Created September 4, 2021 13:43
Boilerplate for Python Discord Bot
from discord.ext import commands
client = commands.Bot(
command_prefix='!',
help_command=None
)
@client.command()
async def hello(ctx):
await ctx.send('Hello!')
<?php
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $this->getHook(),
CURLOPT_HTTPHEADER => array("Content-Type: application/json"),
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => json_encode($data)
@InspectorGadget
InspectorGadget / payload.json
Created August 28, 2019 18:04
GitHub Payload
{
"commits": [
{
"id": "6a7a1fe81b3fe0257d973ca60bc5db3def9051cb",
"tree_id": "641b29bef476d394877bb29ab6aebf446f150b3d",
"distinct": true,
"message": "DB_EVENTS to the ENV",
"timestamp": "2019-08-29T02:01:39+08:00",
"url": "https://github.com/InspectorGadget/sds-cms/commit/6a7a1fe81b3fe0257d973ca60bc5db3def9051cb",
"author": {
@InspectorGadget
InspectorGadget / ddos.py
Created April 12, 2019 03:05
DDOS Script in Python
# Author : InspectorGadget
# All copyrights to RTGNetwork Security Team
import random
import socket
import string
import sys
import threading
import time
<?PHP
// Include core files
include "Core/connect.php";
include "Core/functions.php";
// Connect
connect($server, $user, $password, $database);
// Get the options from the kbx_options table
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('max_execution_time', 300); //300 seconds = 5 minutes. In case if your CURL is slow and is loading too much (Can be IPv6 problem)
error_reporting(E_ALL);
define('OAUTH2_CLIENT_ID', '1234567890');
define('OAUTH2_CLIENT_SECRET', 'verysecretclientcode');
@InspectorGadget
InspectorGadget / payout.php
Last active January 6, 2019 13:33
A Small Help for IG
// What I want to do
// Some teachers will have a lot of Levels, like S4, S5, S6
// Each Level has its own rate per hour
// I want to know how i can filter each level?
<?php
switch ($_GET['parameter']) {
@InspectorGadget
InspectorGadget / file.php
Created January 4, 2019 13:13
Help me here
<?php
$line = explode(", ", $api->returnCourseHandler()->returnPreviousCompletedCourse($username));
// The response I get from this array if I print_r is "Array ( [0] => C1 [1] => C2 )"
if (in_array("C1", $line)) {
echo "
<div class='col-md-4'>
<div class='card'>
<div class='card-header'>
<?php
// Information at below: I've explained
// Inside Website:
<?php
error_reporting(1);
require 'includes/Handler.php';
$api = new Handler();
@InspectorGadget
InspectorGadget / file.php
Last active December 10, 2018 05:38
PHP
<?php
public function setFinance($month, $year, $param, $money) {
if ($this->checkFinance($month, $year) !== false) { // UPDATE
switch (strtolower($param)) {
case "inbound":
$previousInbound = $this->returnPrevInbound($month, $year);
$newInbound = $previousInbound + $money;
$run = $this->updateDatabase($month, $year, "inbound", $newInbound);
if ($run === true) {
return true;