Skip to content

Commit

Permalink
added require for source param. Added MFT Reference displaied as nest…
Browse files Browse the repository at this point in the history
…ed struct.
  • Loading branch information
forensicmatt committed Jul 28, 2017
1 parent 3220fe3 commit 238e183
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "RustyLnk"
version = "0.1.0"
version = "0.1.1"
authors = ["Matthew Seyer <https://github.com/forensicmatt>"]

[lib]
Expand Down
10 changes: 9 additions & 1 deletion src/main.rs
Expand Up @@ -3,9 +3,12 @@ extern crate env_logger;
extern crate rustylnk;
extern crate clap;
extern crate seek_bufread;
extern crate rwinstructs;
extern crate jmespath;
extern crate serde_json;
extern crate serde;
use rwinstructs::reference;
use rwinstructs::serialize;
use clap::{App, Arg, ArgMatches};
use jmespath::{Expression};
use seek_bufread::BufReader;
Expand Down Expand Up @@ -114,7 +117,8 @@ fn main() {
.short("s")
.long("source")
.value_name("PATH")
.help("The LNK file or folder with LNK files to parse.")
.help("A file or folder to to parse lnk files (looks for .lnk extention and is recursive)")
.required(true)
.takes_value(true);

let jmes_arg = Arg::with_name("query")
Expand All @@ -138,6 +142,10 @@ fn main() {
.arg(bool_arg)
.get_matches();

// Set Reference Display Options
unsafe{reference::NESTED_REFERENCE = true;}
unsafe{serialize::U64_SERIALIZATION = serialize::U64Serialization::AsString;}

let source = options.value_of("source").unwrap();

if is_directory(source) {
Expand Down

0 comments on commit 238e183

Please sign in to comment.