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
use rustc_serialize::hex::ToHex; | |
use rustc_serialize::hex::FromHex; | |
pub fn xor(a: &str, b: &str) -> Vec<u8> { | |
return a.from_hex().unwrap().iter().zip(b.from_hex().unwrap().iter()).map(|(&x,&y)|x^y).collect(); | |
} | |
#[cfg(test)] | |
mod tests { |
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
use rustc_serialize::hex::ToHex; | |
use rustc_serialize::hex::FromHex; | |
pub fn xor(a: &str, b: &str) -> Vec<u8> { | |
return a.from_hex().unwrap().iter().zip(b.from_hex().unwrap().iter()).map(|(&x,&y)|x^y).collect(); | |
} | |
#[cfg(test)] |
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
extern crate rustc_serialize; | |
use rustc_serialize::hex::{FromHex,ToHex}; | |
use std::fmt::LowerHex; | |
use std::iter; | |
fn main() { | |
let hex_str = "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"; | |
for x in 0..256 { |
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
extern crate rustc_serialize; | |
use rustc_serialize::hex::{FromHex,ToHex}; | |
fn main() { | |
let hex_str = "1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736"; | |
let a = "88888888888888888888888888888888888888888888888888888888888888888888"; | |
let result = xor(hex_str,a); | |
println!("{:?}",result); |
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
<resources> | |
<resource> | |
<directory>src/main/resources</directory> | |
<filtering>true</filtering> | |
</resource> | |
<resource> | |
<directory>src/main/java</directory> | |
<includes> | |
<include>**/*.xml</include> | |
</includes> |
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
e.g. only | |
$ mysqld_safe --skip-grant-tables --skip-networking & | |
[1] 22411 | |
# 140603 11:57:04 mysqld_safe Logging to syslog. | |
140603 11:57:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql | |
$ mysql -u root | |
mysql> use mysql; |
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
# MySQL Workbench 6.2 for Mac OS-X Yosemite | |
sudo ln -s /Applications/MySQLWorkbench.app/Contents/MacOS/mysqldump /usr/bin/mysqldump | |
sudo ln -s /Applications/MySQLWorkbench.app/Contents/MacOS/mysql /usr/bin/mysql |
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 org.dlw.mail; | |
import java.util.Properties; | |
import javax.mail.Message; | |
import javax.mail.MessagingException; | |
import javax.mail.Session; | |
import javax.mail.Transport; | |
import javax.mail.internet.InternetAddress; | |
import javax.mail.internet.MimeMessage; |
NewerOlder