diff options
author | Jesse Luehrs <doy@tozt.net> | 2015-03-30 23:24:10 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2015-03-30 23:24:10 -0400 |
commit | abb70d2f9bf9fe74397a5f644aca5fabbacc77dc (patch) | |
tree | f1d673f7ecb916956a95ac6eae515799fef66109 | |
parent | 6aac313a011ad9727b0939f90a2253636f544886 (diff) | |
download | matasano-abb70d2f9bf9fe74397a5f644aca5fabbacc77dc.tar.gz matasano-abb70d2f9bf9fe74397a5f644aca5fabbacc77dc.zip |
update rustc
-rw-r--r-- | Cargo.lock | 26 | ||||
-rw-r--r-- | src/crack.rs | 4 |
2 files changed, 19 insertions, 11 deletions
@@ -2,9 +2,9 @@ name = "matasano" version = "0.0.1" dependencies = [ - "openssl 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.10 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -18,8 +18,13 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] +name = "lazy_static" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] name = "libc" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -37,21 +42,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-sys" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "libressl-pnacl-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -71,12 +77,12 @@ name = "rand" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-serialize" -version = "0.3.7" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/src/crack.rs b/src/crack.rs index 979c0c2..523c7e8 100644 --- a/src/crack.rs +++ b/src/crack.rs @@ -243,7 +243,9 @@ pub fn crack_querystring_aes_128_ecb<F> (encrypter: &F) -> (String, Vec<Vec<u8>> } } - if let [(ref block1, _), (ref block2, _)] = &most_common_blocks[..] { + if most_common_blocks.len() == 2 { + let (ref block1, _) = most_common_blocks[0]; + let (ref block2, _) = most_common_blocks[1]; return (block1.clone(), block2.clone()); } else { |