Skip to content

Instantly share code, notes, and snippets.

###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 June 26, 2015 03:46
Web Application Pentest Cheat Sheet
=== 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 June 6, 2015 05:57
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!
@stevenswafford
stevenswafford / write_files_to_zip.py
Created June 5, 2015 03:37
Demonstrates how to use zipfile to write some files into a zip archive.
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 June 5, 2015 03:35
Demonstrates how to use zipfile to list the files contained in a zip archive.
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 June 3, 2015 06:39
Zipdump allows you to inspect ZIP files.
#!/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 February 17, 2022 15:25
This tool helps you to find hack attempts within webserver log files (e.g. Apache2 access logs).
#!/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 May 9, 2022 07:57
Maps DNS from a given domain.
#!/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 May 9, 2022 07:57
Download files using curl.
#!/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" `)