Skip to content

Instantly share code, notes, and snippets.

View ssh_commands.txt
###SSH into a remote machine###
#domain name
ssh user@domain.com
#ip address
ssh user@192.168.1.1
__exit:__ `exit`
@stevenswafford
stevenswafford / webapppentest
Created Jun 26, 2015
Web Application Pentest Cheat Sheet
View webapppentest
=== http status codes ===================================================
1xx Informational
100 Continue
101 Switching Protocols
102 Processing (WebDAV; RFC 2518)
2xx Success
200 OK
201 Created
@stevenswafford
stevenswafford / google-dorks
Created Jun 6, 2015
Listing of a number of useful Google dorks.
View google-dorks
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!
@stevenswafford
stevenswafford / write_files_to_zip.py
Created Jun 5, 2015
Demonstrates how to use zipfile to write some files into a zip archive.
View write_files_to_zip.py
import os
import zipfile
# List all files in the current directory
allFileNames = os.listdir( os.curdir )
# Open the zip file for writing, and write some files to it
myZipFile = zipfile.ZipFile( "spam_skit.zip", "w" )
# Write each file present into the new zip archive, except the python script
@stevenswafford
stevenswafford / list_files_in_zip.py
Created Jun 5, 2015
Demonstrates how to use zipfile to list the files contained in a zip archive.
View list_files_in_zip.py
import zipfile
myZipFile = zipfile.ZipFile( "test.zip", "r" )
# List all files contained within the zip file
for fileName in myZipFile.namelist():
print fileName
print
# List file information
@stevenswafford
stevenswafford / zipdump.py
Created Jun 3, 2015
Zipdump allows you to inspect ZIP files.
View zipdump.py
#!/usr/bin/env python
import optparse
import zipfile
import hashlib
import signal
import sys
import os
import cStringIO
import textwrap
@stevenswafford
stevenswafford / scan_log.py
Last active Aug 1, 2018
This tool helps you to find hack attempts within webserver log files (e.g. Apache2 access logs).
View scan_log.py
#!/usr/bin/python
# Description:
# This tool helps you to find hack attempts
# within webserver log files (e.g. Apache2 access logs).
# Features:
# - Error handling
# - Scan a log file for four different attack types
# - Display a short scan report
@stevenswafford
stevenswafford / dnsmap.py
Last active Aug 29, 2015
Maps DNS from a given domain.
View dnsmap.py
#!/usr/bin/env python
# Description : Maps DNS from a given domain.
import socket
import sys
domain = raw_input("Enter domain: ")
try:
@stevenswafford
stevenswafford / curl_download.sh
Last active Aug 29, 2015
Download files using curl.
View curl_download.sh
#!/bin/bash
# Description : Download files using curl.
echo "Enter the name of your flat file: "
read input_variable
echo "You entered: $input_variable"
#create urls variable array
declare urls=( `cat "$input_variable" `)
You can’t perform that action at this time.