Skip to content

Instantly share code, notes, and snippets.

View imran-parray's full-sized avatar
🏠
Working from home

imran parray imran-parray

🏠
Working from home
View GitHub Profile
@imran-parray
imran-parray / regreSSHion.yaml
Created July 2, 2024 03:59
Quick #regreSSHion checker (based on software version) for #nuclei CVE-2024-6387
id: CVE-2024-6387
info:
name: RegreSSHion detect (based on software version)
author: UnaPibaGeek
severity: High
description: Regression (CVE-2024-6387) software version checker.
classification:
cve-id: CVE-2024-6387
metadata:
@imran-parray
imran-parray / rm_unwanted_nuclei_templates.bash
Last active June 28, 2024 13:07
remove all info and low templates from Nuclei Temaplte Dir
find nuclei-templates -type f -name "*.yaml" -exec grep -q "severity: info" {} \; -exec rm {} \;
@imran-parray
imran-parray / Sudomains Split
Last active June 22, 2024 05:13
Seperate Subdomains as per their domains and make a seprate Txt file of each domain
while IFS= read -r line; do echo "$line" >> "$(echo "$line" | awk -F. '{print $(NF-1)"."$NF}').txt"; done < subdomains.txt
@imran-parray
imran-parray / PHP-CURL-GET-POST.md
Last active June 24, 2021 07:06
How to make Curl GET and POST request using CURL in PHP

HTTP GET

function httpGET($url,$headers)
{
   	$curl = curl_init($url);
    curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($curl);
    curl_close($curl);
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'example1';
$dbuser = 'user';
$dbpass = '';
$dbhost = 'localhost';
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
cat temp.txt| while read line ; do echo "QUIT"|openssl s_client -connect $line:443 2>&1|grep 'server extension "heartbeat" (id=15)' || echo $line: safe; done
import re
import sys
urls=[]
try:
file_name=sys.argv[1]
replacement=sys.argv[2]
except:
print("[!] Enter urls file name")
giturls()
{
while read line; do echo $line | cut -d/ -f1-3;echo $line | cut -d/ -f1-4;echo $line | cut -d/ -f1-5;echo $line | cut -d/ -f1-6;echo $line | cut -d/ -f1-7;echo $line | cut -d/ -f1-8;echo $line | cut -d/ -f1-9;echo $line | cut -d/ -f1-10;echo $line | cut -d/ -f1-11;echo $line | cut -d/ -f1-12;echo $line | cut -d/ -f1-13;echo $line | cut -d/ -f1-14;echo $line | cut -d/ -f1-15;echo $line | cut -d/ -f1-16;echo $line | cut -d/ -f1-17;echo $line | cut -d/ -f1-18;echo $line | cut -d/ -f1-19;echo $line | cut -d/ -f1-20;echo $line | cut -d/ -f1-21;done | grep -v '?' | grep -v "\...$" | grep -v "\....$" | grep -v "\....$" | sort -u
}
data=['http://google.com?param1=value1',
'https://hello.com?param2=1&param3=3',
'https://hello.com?param1=1&param2=2&param4=4']
final_params=[]
all_prms=[]
for line in data:
all_prms.append(line.split('?')[1:][0].split('&'))
for line in all_prms:
#!/bin/bash
# update apt-get
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
# remove previously installed Docker
sudo apt-get remove docker docker-engine docker.io* lxc-docker*
# install dependencies 4 cert