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
# show ip address for ssh host, with zsh completion for hostname | |
_sship () { ssh -G $1 | awk '/^hostname/ {print $2}' } | |
compdef _sship=ssh | |
# Usage | |
# ===== | |
# Add the above two lines to the bottom of your ~/.zshrc file. | |
# | |
# Use it like this on the commandline: |
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 java.awt.FlowLayout; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.io.DataInputStream; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
import java.net.InetAddress; | |
import java.net.Socket; | |
import javax.swing.ImageIcon; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <openssl/evp.h> | |
// compile with: gcc -lssl find.c |
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
<?php | |
@include_once('patches.php'); // This has some custom patches for our Archon. | |
require_once('includes.inc.php'); | |
require_once("packages/digitallibrary/lib/file.inc.php"); | |
$query = "select id, length(FileContents) as fcsize, length(FilePreviewLong) as fplsize, length(FilePreviewShort) as fpssize from tblDigitalLibrary_Files where id=?"; // and (length(FileContents)=length(FilePreviewLong) or length(FileContents)=length(FilePreviewShort))"; | |
$prep = $_ARCHON->mdb2->prepare($query, array('integer'), MDB2_PREPARE_RESULT); | |
function needsResizing($id) { | |
global $prep; |
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
<?php | |
require "inc/mysql.inc.php"; | |
?> | |
<html> | |
<head><title>Oh, Those Admins!</title></head> | |
<body><center><h1>Oh, hi!</h1> | |
<?php | |
if (isset($_GET['password'])) { | |
$r = mysql_query("SELECT login FROM admins WHERE password = '" . md5($_GET['password'], true) . "'"); | |
if (mysql_num_rows($r) < 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
<?php | |
// This class has functionality which can be used by many other classes. | |
class CommonFunctionalityClass { | |
function doSomethingCommon() { | |
$this->supportingFunction(); | |
} | |
function supportingFunction() { | |
echo(“hi”); | |
} |
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
line_starts = [] | |
filename = "/usr/share/dict/words" | |
# preprocess | |
File.open(filename, "r") do |input| | |
until input.eof? | |
pos = input.pos | |
input.readline | |
line_starts << pos |
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
line_starts = [] | |
filename = "/usr/share/dict/words" | |
# preprocess | |
File.open(filename, "r") do |input| | |
until input.eof? | |
pos = input.pos | |
input.readline | |
line_starts << pos |
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
startup_message off | |
defflow auto | |
defscrollback 5000 | |
altscreen on | |
autodetach on | |
msgwait 3 | |
#change the hardstatus settings to give an window list at the bottom of the | |
#screen, with the time and date and with the current window highlighted | |
defutf8 on |
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
- the book | |
- web application hacker's handbook (http://amzn.com/1118026470) | |
- hacking challenges and practice | |
- hack this site (http://hackthissite.org) | |
- damn vulnerable web app (http://dvwa.co.uk) | |
- capture-the-flag competitions (http://capture.thefl.ag) | |
- local groups | |
- swampsec (http://swampsec.org) | |
- uf hacking club (http://ufhack.org) | |
- gainesville hackerspace* (http://skillhouse.org) |
NewerOlder