This file contains hidden or 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 requests | |
import re | |
from cmd import Cmd | |
class Terminal(Cmd): | |
print(""" | |
____/\\\\\\\\\____________/\\\\\\\\\__/\\\\\\\\\\\\\\\_______________/\\\\\\\________/\\\\\\\________/\\\\\\\____ | |
__/\\\///////\\\_______/\\\////////__\/\\\///////////_____________/\\\//////\\\___/\\\//////\\\___/\\\//////\\\__ | |
_\/\\\_____\/\\\_____/\\\/___________\/\\\_______________________\///_____\//\\\_\///_____\//\\\_\///_____\//\\\_ | |
_\/\\\\\\\\\\\/_____/\\\_____________\/\\\\\\\\\\\_________________________/\\\____________/\\\____________/\\\__ |
This file contains hidden or 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 socket | |
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
port = 4444 | |
client.connect(('127.0.0.1', port)) | |
print(client.recv(1024).decode()) |
This file contains hidden or 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 asyncio | |
import websockets | |
# create handler for each connection | |
async def handler(websocket, path): | |
data = await websocket.recv() |
This file contains hidden or 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 socket | |
import sys | |
try: | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
print ("Socket successfully created") | |
except socket.error as err: | |
print ("socket creation failed with error %s" %(err)) | |
http = 80 |
This file contains hidden or 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 socket | |
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
port = 4444 | |
server.bind(('', port)) | |
print(f"Socket binded to {port}") |
This file contains hidden or 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 | |
# Metapackages are used to install many packages at one time, created as a list of dependencies on other packages. Kali Linux uses these in a few ways. One way is allowing users to decide how many packages out of the total Kali list they would like to install. Need just enough to use Linux? Want enough to conduct Pentests? Perhaps nearly every package available in Kali? | |
# To install a metapackage we first need to update and then install the desired package: | |
apt = "apt install " | |
kali_tools = "kali-tools-" | |
y = " -y" |
This file contains hidden or 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
# pip install wget | |
# coding: utf8 | |
import wget | |
os = "" | |
p_word = "" | |
surum = input("Enter the version you want to download: ") | |
platform = input("Linux:1 / Windows:2 / :") | |
if platform == "1": | |
os = "tgz" | |
p_word = "P" |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000