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 | |
$Password = 'SuperSecurePassword123'; | |
// These only work for CRYPT_SHA512, but it should give you an idea of how crypt() works. | |
$Salt = uniqid(); // Could use the second parameter to give it more entropy. | |
$Algo = '6'; // This is CRYPT_SHA512 as shown on http://php.net/crypt | |
$Rounds = '5000'; // The more, the more secure it is! | |
// This is the "salt" string we give to crypt(). |
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 | |
$Password = $_POST['Password']; | |
$Query = "select `Password` from `Users` where `Username` = '" . mysql_real_escape_string($_POST['Username']) . "'"; | |
$res = mysql_query($Query); | |
$row = mysql_fetch_assoc($res); | |
$HashedPassword = $row['Password']; | |
// Now, what about checking if a password is the right password? |
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 | |
$Password1 = 'WrongPassword'; | |
$Password2 = 'SuperSecurePassword123'; | |
$sql = "select `Password` from `Users` where id = 5"; | |
$res = mysql_query($sql); | |
if ($res) { | |
$foo = mysql_fetch_assoc($res); | |
$HashedPassword = $foo['Password']; |
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
var con = require('net').Socket(); | |
con.on('connect', connected); | |
con.setEncoding('utf8'); | |
con.connect(6667, 'irc.ss23.geek.nz'); | |
function connected() { | |
// Connected! | |
// As soon as we receive some data, we can write our NICK / USER |
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
ss23@Crisp ~/irc_node $ node irc.js | |
[2011-5-14 2:15:52]-> NICK ss23bot | |
[2011-5-14 2:15:52]-> USER ss23 ss23`bot ss23`bot :ss23`bot | |
14 Jun 02:15:52 - Adding | |
[2011-5-14 2:15:52]<- :irc.ss23.geek.nz NOTICE AUTH :*** Looking up your hostname... | |
14 Jun 02:15:52 - Adding | |
[2011-5-14 2:15:52]<- :irc.ss23.geek.nz NOTICE AUTH :*** Found your hostname (cached) | |
14 Jun 02:15:52 - Adding | |
[2011-5-14 2:15:52]<- :irc.ss23.geek.nz NOTICE AUTH :*** Checking ident... |
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
# Min Hour DOM Month DOW Command | |
1 3 * * * updatedb >/dev/null 2>&1 | |
1 13 * * * emerge --sync >/var/log/emerge-cron.log 2>&1 | |
* * * * * /usr/bin/mrtg /etc/mrtg.conf >/dev/null 2>&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
//*********************************************************** | |
// Lab5.c Temperature sampling example using ADC10 | |
// Clocking: MCLK and SMCLK = 1.1MHz DCO/8 | |
// ACLK = 12kHz VLO | |
// | |
// SFB 9/2010 | |
//*********************************************************** | |
#include <msp430g2231.h> |
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
(chroot) Crisp linux # make -j5 | |
CHK include/linux/version.h | |
CHK include/generated/utsrelease.h | |
CALL scripts/checksyscalls.sh | |
CHK include/generated/compile.h | |
LD grsecurity/built-in.o | |
grsecurity/grsec_disabled.o: In function `gr_is_capable': | |
grsec_disabled.c:(.text+0x160): multiple definition of `gr_is_capable' | |
grsecurity/grsec_exec.o:grsec_exec.c:(.text+0x10): first defined here | |
grsecurity/grsec_disabled.o: In function `gr_is_capable_nolog': |
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
Crisp ss23 # hdparm -r /dev/sdf2 | |
/dev/sdf2: | |
readonly = 0 (off) | |
Crisp ss23 # btrfsck /dev/sdf2 | |
found 2394718208 bytes used err is 0 | |
total csum bytes: 1930568 | |
total tree bytes: 417816576 | |
total fs tree bytes: 398311424 | |
btree space waste bytes: 113042195 |
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
>>> Emerging (1 of 3) dev-python/lxml-2.3 | |
* lxml-2.3.tgz RMD160 SHA1 SHA256 size ;-) ... [ ok ] | |
>>> Unpacking source... | |
>>> Unpacking lxml-2.3.tgz to /var/tmp/portage/dev-python/lxml-2.3/work | |
>>> Source unpacked in /var/tmp/portage/dev-python/lxml-2.3/work | |
>>> Preparing source in /var/tmp/portage/dev-python/lxml-2.3/work/lxml-2.3 ... | |
>>> Source prepared. | |
>>> Configuring source in /var/tmp/portage/dev-python/lxml-2.3/work/lxml-2.3 ... | |
>>> Source configured. | |
>>> Compiling source in /var/tmp/portage/dev-python/lxml-2.3/work/lxml-2.3 ... |
OlderNewer