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
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
) | |
func mac2ip(s string) (net.IP, error) { | |
mac, err := net.ParseMAC(s) |
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
package main | |
import ( | |
"errors" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"os" |
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
func md5Crypt(password string, salt string, prefix string) string { | |
// start with a hash of password and salt | |
initBin := md5.Sum([]byte(password + salt + password)) | |
// begin an initial string with hash and salt | |
initText := bytes.NewBufferString(password + prefix + salt) | |
// add crap to the string willy-nilly | |
for i := len(password); i > 0; i -= 16 { |
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
--- a/net/ipv4/af_inet.c | |
+++ b/net/ipv4/af_inet.c | |
@@ -467,11 +467,28 @@ int inet_bind(struct socket *sock, struc | |
chk_addr_ret != RTN_BROADCAST) | |
goto out; | |
+ /* HACK */ | |
snum = ntohs(addr->sin_port); | |
- err = -EACCES; | |
- if (snum && snum < PROT_SOCK && |
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
package main | |
import ( | |
"fmt" | |
"net" | |
"os" | |
"time" | |
"golang.org/x/net/icmp" | |
"golang.org/x/net/ipv4" |
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
package main | |
import ( | |
"bytes" | |
"encoding/hex" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"net" |
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
# I didn't write this, I just adapted it from the lenny version: https://gist.github.com/href/54859127c183f67f947f | |
# inspired by http://askubuntu.com/a/528171 | |
# prerequisites | |
sudo apt-get install bison | |
# get bash 3.1 source | |
mkdir src && cd src | |
wget http://ftp.gnu.org/gnu/bash/bash-3.1.tar.gz | |
tar zxvf bash-3.1.tar.gz |
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
/* Copyright (C) 2011 Intel Corporation | |
Author: Andi Kleen | |
Set 2.6.x personality | |
uname26 is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public | |
License as published by the Free Software Foundation; version | |
2. | |
uname26 is distributed in the hope that it will be useful, |