From abb70d2f9bf9fe74397a5f644aca5fabbacc77dc Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 30 Mar 2015 23:24:10 -0400 Subject: update rustc --- Cargo.lock | 26 ++++++++++++++++---------- src/crack.rs | 4 +++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6987d7b..45cdd11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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]] @@ -17,9 +17,14 @@ name = "gcc" 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 (encrypter: &F) -> (String, Vec> } } - 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 { -- cgit v1.2.3-54-g00ecf