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 ipaddress | |
import re | |
firstIP_pattern = re.compile('^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)') | |
lastIP_pattern = re.compile('(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$') | |
CIDR_pattern = re.compile('^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$') | |
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
#!/usr/bin/python | |
from urlparse import urlparse | |
from argparse import ArgumentParser | |
import sys | |
def main(): | |
parser = ArgumentParser(description='Provide file with URLs and file to save extracted hostnames') | |
parser.add_argument('-i', dest='input_filename', help='Enter name of input file, containing URLs', metavar='FILE') | |
parser.add_argument('-o', dest='output_filename', help='Enter name of output file to save extracted hostnames', metavar='FILE') | |
if len(sys.argv) == 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
#!/usr/bin/python | |
from ipwhois import IPWhois | |
import sys | |
import csv | |
from argparse import ArgumentParser | |
def whois_query_ip(ip): | |
whois_nets = [] | |
try: | |
query = IPWhois(ip) |
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 dns.resolver | |
with open('hostnames.txt', 'r') as file, open('result_resovle.csv', 'wb') as outfile: | |
for line in file: | |
try: | |
answers = dns.resolver.query(line.strip(), 'A') | |
for rdata in answers: | |
outfile.write(line.strip() + ':' + rdata.to_text() + '\n') | |
except: | |
outfile.write(line.strip() + '\n') |
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 sys | |
import dns.resolver | |
import dns.query | |
import dns.zone | |
import csv | |
from termcolor import colored | |
from pprint import pprint | |
resolver = dns.resolver.Resolver() |
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
version: '2' | |
services: | |
elasticsearch1: | |
image: docker.elastic.co/elasticsearch/elasticsearch:5.5.2 | |
container_name: elasticsearch1 | |
environment: | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
ulimits: |
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
#!/usr/bin/python | |
from openpyxl import Workbook, load_workbook | |
from pprint import pprint | |
import csv | |
wb = load_workbook('file.xlsx') | |
ws = wb.get_sheet_by_name('sheet') | |
hosts = {} |
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
#!/usr/bin/python | |
import sys | |
import dns.resolver | |
resolver = dns.resolver.Resolver() | |
resolver.timeout = 5 | |
resolver.lifetime = 5 | |
if __name__ == '__main__': | |
source_file = sys.argv[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 cv2 | |
cap = cv2.VideoCapture(0) | |
fourcc = cv2.VideoWriter_fourcc(*'XVID') | |
out = cv2.VideoWriter('output.avi', fourcc, 20.0, (1024,768)) | |
while(True): | |
ret, frame = cap.read() |
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
patator http_fuzz \ | |
url="http://192.168.101.10:88/index.php?module=Users&action=Login" \ | |
body='__vtrftk=_CSRF_&username=admin&password=FILE0' \ | |
0="~/SecLists/Passwords/10_million_password_list_top_100000.txt" | |
method=POST \ | |
accept_cookie=1 \ | |
follow=1 \ | |
--threads 1 \ | |
timeout=60 \ | |
timeout_tcp=60 \ |
OlderNewer