Skip to content

Instantly share code, notes, and snippets.

@M507
M507 / 4.1.Information.Gathering.sh
Created November 21, 2023 15:34
4.1.Information.Gathering.sh
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <domain>"
exit 1
fi
domain="$1"
url_encode() {
echo -n "$1" | xxd -plain | tr -d '\n' | sed 's/\(..\)/%\1/g'
}
while IFS= read -r line; do
@M507
M507 / Set-SSHPermissions.ps1
Last active November 21, 2023 15:32 — forked from mgeeky/Set-SSHPermissions.ps1
Powershell script to set CHMOD permissions for SSH Private PEM key files in Windows. This is to avoid nagging "WARNING: UNPROTECTED PRIVATE KEY FILE!" message
#
# Sets chmod permissions for the PEM file to be used with Windows' OpenSSH
# without annoying "WARNING: UNPROTECTED PRIVATE KEY FILE!" message.
#
function Set-SSHPermissions {
param(
[string]
$FilePath
66e6584084f60ebe96f809e624374ca5d8a7d20b
{
"project_options":{
"misc":{
"collaborator_server":{
"type":"none"
}
}
},
"proxy":{
"http_history_display_filter":{
@M507
M507 / poc.py
Created January 23, 2022 05:55
Exploits
# 8d16362098c47e4628413f20f6e5dd8840bd804950cd6714bb56e6b4e87c40d0
# fmtstr_payload() is not used here, it's more fun this way ;)
from pwn import *
import sys
# 64bit
def get_process(is_remote = False):
if is_remote:
return remote(*REMOTE_PATH)

.*\.(css|js|svg|css|svg|png|jpeg|jpg|gif|pdf|svg|md|ico|js|htm|html|txt|md|woff2|woff|webp|ttf|xml|doc|docx|bmp|mp3|mp4|json)

@M507
M507 / Send_email.py
Created April 6, 2021 20:25
Send_email.py
import smtplib
def send_data():
gmail_user = '[email protected]'
gmail_password = 'password' # env_var
# Create Email
mail_from = gmail_user
mail_to = "[email protected]"
mail_subject = 'You have a massage'
mail_message_body = 'Body \n'
mail_message = 'From: '+ gmail_user +'\nTo: ' + mail_to + '\nSubject: You have a new massage\n'+mail_message_body+'\n\n'
@M507
M507 / git_backup.sh
Last active March 19, 2021 16:34
Backup public repositories
#!/bin/bash
your_gitlab_profile=gitlab-example.com:username
github_link=$1
folder_name=$(echo $github_link | awk -F'/' '{print $NF}' | rev | cut -c5- | rev)
git clone $github_link $folder_name
cd $folder_name
rm -rf .git/
git init
git add *
git commit -m "Backup script"
@M507
M507 / gist:f2e125dcb812bb15f7dafb40d76ae1f3
Created March 18, 2021 16:02
clear all security onion logs
function cleansoslogs() {
ssh root@$1 -t "so-nsm-clear -y; sleep 1; so-elastic-clear -y; sleep 1; so-sensor-clean"
}
@M507
M507 / BigBountyReconQueries.md
Created February 14, 2021 18:55
All BigBountyRecon repo queries without GUI

BigBountyReconQueries

All BigBountyRecon queries without GUI:

$ cat queries.txt
https://www.google.com/search?q=site:REPLACEME intitle:index.of
https://www.google.com/search?q=site:REPLACEME ext:xml | ext:conf | ext:cnf | ext:reg | ext:inf | ext:rdp | ext:cfg | ext:txt | ext:ora | ext:ini
https://www.google.com/search?q=site:REPLACEME ext:sql | ext:dbf | ext:mdb
https://www.google.com/search?q=site:REPLACEME inurl:wp- | inurl:wp-content | inurl:plugins | inurl:uploads | inurl:themes | inurl:download