├── pr8 ├── src │ ├── lib.rs │ └── r8 │ │ ├── ir │ │ ├── code │ │ │ ├── mod.rs │ │ │ └── ir_code.rs │ │ ├── conversion │ │ │ ├── mod.rs │ │ │ └── one_time_method_processor.rs │ │ ├── mod.rs │ │ ├── service_loader_rewriter.rs │ │ ├── lambda_rewriter.rs │ │ ├── lens_code_rewriter.rs │ │ ├── lambda_merger.rs │ │ ├── string_optimizer.rs │ │ ├── inliner.rs │ │ ├── code_rewriter.rs │ │ └── ir_converter.rs │ │ ├── utils │ │ ├── mod.rs │ │ └── android_app.rs │ │ ├── dex │ │ ├── mod.rs │ │ └── application_reader.rs │ │ ├── jar │ │ ├── mod.rs │ │ └── cf_application_writer.rs │ │ ├── support.rs │ │ ├── graph │ │ ├── dex_value.rs │ │ ├── method_access_flags.rs │ │ ├── app_view.rs │ │ ├── dex_type.rs │ │ ├── dex_type_list.rs │ │ ├── dex_string.rs │ │ ├── dex_annotation_set.rs │ │ ├── app_info.rs │ │ ├── dex_annotation_element.rs │ │ ├── dex_annotation.rs │ │ ├── dex_encoded_annotation.rs │ │ ├── parameter_annotations_list.rs │ │ ├── dex_method.rs │ │ ├── dex_proto.rs │ │ ├── lazy_loaded_dex_application.rs │ │ ├── mod.rs │ │ ├── program_method.rs │ │ ├── code.rs │ │ ├── dex_encoded_method.rs │ │ ├── method_collection.rs │ │ ├── dex_application.rs │ │ └── dex_program_class.rs │ │ ├── mod.rs │ │ ├── r8.rs │ │ ├── support │ │ └── class_file_consumer.rs │ │ ├── d8_command.rs │ │ ├── d8_command_parser.rs │ │ ├── d8.rs │ │ └── d8_builder.rs ├── README.md ├── Cargo.toml └── LICENSE ├── pdx ├── src │ ├── dx │ │ ├── dex │ │ │ ├── rop │ │ │ │ ├── code │ │ │ │ │ └── mod.rs │ │ │ │ ├── cst │ │ │ │ │ ├── cst_nat.rs │ │ │ │ │ ├── cst_array.rs │ │ │ │ │ ├── type_constant.rs │ │ │ │ │ ├── constant.rs │ │ │ │ │ ├── cst_string.rs │ │ │ │ │ ├── cst_type.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── std_constant_pool.rs │ │ │ │ ├── mod.rs │ │ │ │ └── iface │ │ │ │ │ ├── method_list.rs │ │ │ │ │ ├── std_attribute_list.rs │ │ │ │ │ ├── field_list.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── type_list.rs │ │ │ ├── cf │ │ │ │ ├── mod.rs │ │ │ │ └── direct │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── file_bytes_consumer.rs │ │ │ │ │ ├── class_path_opener.rs │ │ │ │ │ └── direct_class_file.rs │ │ │ ├── mod.rs │ │ │ └── file │ │ │ │ ├── mod.rs │ │ │ │ ├── encoded_method.rs │ │ │ │ ├── header_section.rs │ │ │ │ ├── dex_file.rs │ │ │ │ └── class_def_item.rs │ │ ├── util │ │ │ ├── mod.rs │ │ │ └── byte_array.rs │ │ ├── dex_option.rs │ │ ├── command │ │ │ ├── base_dump.rs │ │ │ ├── class_def_item_consumer.rs │ │ │ ├── mod.rs │ │ │ ├── class_translator_task.rs │ │ │ ├── class_parser_task.rs │ │ │ ├── cf_translator.rs │ │ │ ├── direct_class_file_consumer.rs │ │ │ └── dexer.rs │ │ └── mod.rs │ └── lib.rs ├── README.md └── Cargo.toml ├── poat ├── src │ └── lib.rs └── Cargo.toml ├── _fixtures ├── rust │ ├── hello.rs │ └── hello ├── c │ ├── hello │ ├── hello.c │ └── README.md ├── apk │ └── .gitignore ├── asm │ ├── hello_world.o │ ├── README.md │ └── hello_world.asm └── java │ ├── hello │ ├── classes.dex │ ├── HelloWorld.class │ └── HelloWorld.java │ └── README.md ├── src ├── cmd │ ├── mod.rs │ ├── cmd_papk.rs │ ├── cmd_unpack.rs │ └── cmd_pclass.rs ├── highlight.rs └── main.rs ├── .gitignore ├── docs └── android │ └── resource-arsc-spec.png ├── pelf ├── Cargo.toml └── src │ └── lib.rs ├── pdex ├── Cargo.toml └── src │ └── lib.rs ├── pclass ├── Cargo.toml └── src │ └── lib.rs ├── papk ├── Cargo.toml └── src │ └── lib.rs ├── justfile ├── Cargo.toml ├── README.md └── Cargo.lock /pr8/src/lib.rs: -------------------------------------------------------------------------------- 1 | mod r8; 2 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/code/mod.rs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /poat/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub fn parse_oat() {} 2 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/cf/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod direct; 2 | -------------------------------------------------------------------------------- /pdx/src/dx/util/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod byte_array; 2 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/code/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod ir_code; 2 | -------------------------------------------------------------------------------- /pr8/src/r8/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod android_app; 2 | -------------------------------------------------------------------------------- /pdx/src/dx/dex_option.rs: -------------------------------------------------------------------------------- 1 | pub struct DexOption {} 2 | -------------------------------------------------------------------------------- /pr8/src/r8/dex/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod application_reader; 2 | -------------------------------------------------------------------------------- /pdx/src/dx/command/base_dump.rs: -------------------------------------------------------------------------------- 1 | pub struct BaseDump {} 2 | -------------------------------------------------------------------------------- /pr8/src/r8/jar/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod cf_application_writer; 2 | -------------------------------------------------------------------------------- /pr8/src/r8/support.rs: -------------------------------------------------------------------------------- 1 | pub mod class_file_consumer; 2 | -------------------------------------------------------------------------------- /pdx/README.md: -------------------------------------------------------------------------------- 1 | # P-DX 2 | 3 | A simple research for PX 4 | 5 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod cf; 2 | pub mod file; 3 | pub mod rop; 4 | -------------------------------------------------------------------------------- /pdx/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod dx; 2 | 3 | #[cfg(test)] 4 | mod tests {} 5 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/conversion/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod one_time_method_processor; 2 | -------------------------------------------------------------------------------- /_fixtures/rust/hello.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("Hello World!"); 3 | } 4 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/cst/cst_nat.rs: -------------------------------------------------------------------------------- 1 | pub struct CstNat {} 2 | 3 | impl CstNat {} 4 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod code; 2 | pub mod cst; 3 | pub mod iface; 4 | -------------------------------------------------------------------------------- /_fixtures/c/hello: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rapilab/decoder/HEAD/_fixtures/c/hello -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/cst/cst_array.rs: -------------------------------------------------------------------------------- 1 | pub struct CstArray {} 2 | 3 | impl CstArray {} 4 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_value.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone)] 2 | pub struct DexValue {} 3 | -------------------------------------------------------------------------------- /src/cmd/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod cmd_papk; 2 | pub mod cmd_pclass; 3 | pub mod cmd_unpack; 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | default.profraw 3 | .idea 4 | apk_output 5 | app-release-unsigned 6 | -------------------------------------------------------------------------------- /_fixtures/rust/hello: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rapilab/decoder/HEAD/_fixtures/rust/hello -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/iface/method_list.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone)] 2 | pub struct MethodList {} 3 | -------------------------------------------------------------------------------- /pdx/src/dx/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod command; 2 | pub mod dex; 3 | pub mod dex_option; 4 | pub mod util; 5 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/cst/type_constant.rs: -------------------------------------------------------------------------------- 1 | pub struct TypeConstant {} 2 | 3 | impl TypeConstant {} 4 | -------------------------------------------------------------------------------- /_fixtures/apk/.gitignore: -------------------------------------------------------------------------------- 1 | app-release-unsigned.apk 2 | app-release-unsigned.zip 3 | app-release-unsigned 4 | -------------------------------------------------------------------------------- /_fixtures/asm/hello_world.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rapilab/decoder/HEAD/_fixtures/asm/hello_world.o -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/iface/std_attribute_list.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone)] 2 | pub struct StdAttributeList {} 3 | -------------------------------------------------------------------------------- /pdx/src/dx/util/byte_array.rs: -------------------------------------------------------------------------------- 1 | pub struct ByteArray {} 2 | 3 | impl ByteArray { 4 | pub fn new() {} 5 | } 6 | -------------------------------------------------------------------------------- /_fixtures/c/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | int main() { 3 | printf ("Hi World\n"); 4 | return 0; 5 | } 6 | -------------------------------------------------------------------------------- /_fixtures/java/hello/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rapilab/decoder/HEAD/_fixtures/java/hello/classes.dex -------------------------------------------------------------------------------- /docs/android/resource-arsc-spec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rapilab/decoder/HEAD/docs/android/resource-arsc-spec.png -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/cst/constant.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone)] 2 | pub struct Constant { 3 | type_name: String, 4 | } 5 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/iface/field_list.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone)] 2 | pub struct FieldList {} 3 | 4 | impl FieldList {} 5 | -------------------------------------------------------------------------------- /_fixtures/java/hello/HelloWorld.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rapilab/decoder/HEAD/_fixtures/java/hello/HelloWorld.class -------------------------------------------------------------------------------- /pdx/src/dx/dex/cf/direct/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod class_path_opener; 2 | pub mod direct_class_file; 3 | pub mod file_bytes_consumer; 4 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/file/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod class_def_item; 2 | pub mod dex_file; 3 | pub mod encoded_method; 4 | pub mod header_section; 5 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/iface/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod field_list; 2 | pub mod method_list; 3 | pub mod std_attribute_list; 4 | pub mod type_list; 5 | -------------------------------------------------------------------------------- /_fixtures/asm/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | nasm -f elf hello.asm 3 | gcc -o hello hello.o -nostartfiles -nostdlib -nodefaultlibs 4 | strip -s hello 5 | ./hello 6 | ``` -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/cst/cst_string.rs: -------------------------------------------------------------------------------- 1 | pub struct CstString {} 2 | 3 | impl CstString { 4 | pub fn new() -> CstString { 5 | CstString {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /_fixtures/java/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | d8 MyProject/app/build/intermediates/classes/debug/*/*.class 3 | ``` 4 | 5 | ``` 6 | ~/Library/Android/sdk/build-tools/29.0.2/d8 7 | ``` -------------------------------------------------------------------------------- /_fixtures/java/hello/HelloWorld.java: -------------------------------------------------------------------------------- 1 | public class HelloWorld { 2 | public static void main(String... args) { 3 | System.out.println("Hello World!"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/file/encoded_method.rs: -------------------------------------------------------------------------------- 1 | pub struct EncodedMethod {} 2 | 3 | impl EncodedMethod { 4 | pub fn new() -> EncodedMethod { 5 | EncodedMethod {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/file/header_section.rs: -------------------------------------------------------------------------------- 1 | pub struct HeaderSection {} 2 | 3 | impl HeaderSection { 4 | pub fn new() -> HeaderSection { 5 | HeaderSection {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/cst/cst_type.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone)] 2 | pub struct CstType {} 3 | 4 | impl CstType { 5 | pub fn new() -> CstType { 6 | CstType {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/iface/type_list.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone)] 2 | pub struct TypeList {} 3 | 4 | impl TypeList { 5 | pub fn new() -> TypeList { 6 | TypeList {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/cst/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod constant; 2 | pub mod cst_array; 3 | pub mod cst_nat; 4 | pub mod cst_string; 5 | pub mod cst_type; 6 | pub mod std_constant_pool; 7 | pub mod type_constant; 8 | -------------------------------------------------------------------------------- /pr8/README.md: -------------------------------------------------------------------------------- 1 | # R8 2 | 3 | research on R8 with [https://r8.googlesource.com/r8](https://r8.googlesource.com/r8) 4 | 5 | code based on [https://r8.googlesource.com/r8](https://r8.googlesource.com/r8) -------------------------------------------------------------------------------- /pdx/src/dx/command/class_def_item_consumer.rs: -------------------------------------------------------------------------------- 1 | pub struct ClassDefItemConsumer {} 2 | 3 | impl ClassDefItemConsumer { 4 | pub fn new() -> ClassDefItemConsumer { 5 | ClassDefItemConsumer {} 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /pdx/src/dx/command/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod base_dump; 2 | pub mod cf_translator; 3 | pub mod class_def_item_consumer; 4 | pub mod class_parser_task; 5 | pub mod class_translator_task; 6 | pub mod dexer; 7 | pub mod direct_class_file_consumer; 8 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/method_access_flags.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone)] 2 | pub struct MethodAccessFlags {} 3 | 4 | impl MethodAccessFlags { 5 | pub fn new(flags: i32) -> MethodAccessFlags { 6 | MethodAccessFlags {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /pr8/src/r8/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod d8; 2 | pub mod d8_builder; 3 | pub mod d8_command; 4 | pub mod d8_command_parser; 5 | pub mod dex; 6 | pub mod graph; 7 | pub mod ir; 8 | pub mod jar; 9 | pub mod r8; 10 | pub mod utils; 11 | 12 | pub mod support; 13 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/file/dex_file.rs: -------------------------------------------------------------------------------- 1 | use crate::dx::dex::file::header_section::HeaderSection; 2 | 3 | pub struct DexFile {} 4 | 5 | impl DexFile { 6 | pub fn new() -> DexFile { 7 | let section = HeaderSection::new(); 8 | DexFile {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /pr8/src/r8/r8.rs: -------------------------------------------------------------------------------- 1 | pub struct R8 {} 2 | 3 | impl R8 { 4 | pub fn start() {} 5 | 6 | pub fn run() {} 7 | } 8 | 9 | #[cfg(test)] 10 | mod tests { 11 | use crate::r8::r8::R8; 12 | 13 | #[test] 14 | fn test_urn() { 15 | R8::start(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod code; 2 | pub mod code_rewriter; 3 | pub mod conversion; 4 | pub mod inliner; 5 | pub mod ir_converter; 6 | pub mod lambda_merger; 7 | pub mod lambda_rewriter; 8 | pub mod lens_code_rewriter; 9 | pub mod service_loader_rewriter; 10 | pub mod string_optimizer; 11 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/app_view.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_info::AppInfo; 2 | 3 | #[derive(Clone, Debug)] 4 | pub struct AppView { 5 | app_info: AppInfo, 6 | } 7 | 8 | impl AppView { 9 | pub fn create_for_d8(app_info: AppInfo) -> AppView { 10 | AppView { app_info } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_type.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_string::DexString; 2 | 3 | #[derive(Debug, Clone)] 4 | pub struct DexType { 5 | descriptor: DexString, 6 | } 7 | 8 | impl DexType { 9 | pub fn new(descriptor: DexString) -> DexType { 10 | DexType { descriptor } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_type_list.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_type::DexType; 2 | 3 | #[derive(Debug, Clone)] 4 | pub struct DexTypeList { 5 | values: Vec, 6 | } 7 | 8 | impl DexTypeList { 9 | pub fn new(values: Vec) -> DexTypeList { 10 | DexTypeList { values } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /pdx/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "pdx" 3 | version = "0.1.0" 4 | authors = ["Phodal Huang "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | byteorder = { version = "1", default-features = false } 11 | -------------------------------------------------------------------------------- /poat/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "oat" 3 | version = "0.1.0" 4 | authors = ["Phodal Huang "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | 11 | 12 | [lib] 13 | name = "poat" 14 | path = "src/lib.rs" 15 | -------------------------------------------------------------------------------- /pr8/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "pr8" 3 | version = "0.1.0" 4 | authors = ["Phodal Huang "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | log = "0.4" 11 | 12 | [lib] 13 | name = "pr8" 14 | path = "src/lib.rs" 15 | -------------------------------------------------------------------------------- /pelf/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "elf" 3 | version = "0.1.0" 4 | authors = ["Phodal Huang "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | goblin = "0.2" 11 | 12 | [lib] 13 | name = "pelf" 14 | path = "src/lib.rs" 15 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_string.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone)] 2 | pub struct DexString { 3 | size: usize, 4 | content: Vec, 5 | } 6 | 7 | impl DexString { 8 | pub fn new(string: String) -> DexString { 9 | DexString { 10 | size: string.len(), 11 | content: Vec::from(string.as_bytes()), 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /pdex/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "pdex" 3 | version = "0.1.0" 4 | authors = ["Phodal Huang "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | dex = "0.4.0" 11 | memmap = "0.7.0" 12 | 13 | 14 | [lib] 15 | name = "pdex" 16 | path = "src/lib.rs" 17 | -------------------------------------------------------------------------------- /pr8/src/r8/support/class_file_consumer.rs: -------------------------------------------------------------------------------- 1 | pub trait ClassFileConsumer { 2 | fn accept(&self); 3 | } 4 | 5 | pub struct ForwardingConsumer {} 6 | 7 | impl ForwardingConsumer { 8 | pub fn new() -> ForwardingConsumer { 9 | ForwardingConsumer {} 10 | } 11 | } 12 | 13 | impl ClassFileConsumer for ForwardingConsumer { 14 | fn accept(&self) {} 15 | } 16 | -------------------------------------------------------------------------------- /pclass/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "pclass" 3 | version = "0.1.0" 4 | authors = ["Phodal Huang "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | pclass-parser = "0.1.0" 11 | nom = "5.1.1" 12 | 13 | [lib] 14 | name = "pclass" 15 | path = "src/lib.rs" 16 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_annotation_set.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_annotation::DexAnnotation; 2 | 3 | #[derive(Debug, Clone)] 4 | pub struct DexAnnotationSet { 5 | annotations: Vec, 6 | } 7 | 8 | impl DexAnnotationSet { 9 | pub fn new(annotations: Vec) -> DexAnnotationSet { 10 | DexAnnotationSet { annotations } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /_fixtures/asm/hello_world.asm: -------------------------------------------------------------------------------- 1 | section .data 2 | hello_world db "Hello world!", 10 3 | hello_world_len equ $ - hello_world 4 | section .text 5 | global _start 6 | _start: 7 | mov rax, 1 8 | mov rdi, 1 9 | mov rsi, hello_world 10 | mov rdx, hello_world_len 11 | syscall 12 | mov rax, 60 13 | mov rdi, 0 14 | syscall 15 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/app_info.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_application::DexApplication; 2 | 3 | #[derive(Clone, Debug)] 4 | pub struct AppInfo { 5 | pub(crate) app: DexApplication, 6 | } 7 | 8 | impl AppInfo { 9 | pub fn new(app: DexApplication) -> AppInfo { 10 | AppInfo { app } 11 | } 12 | 13 | pub fn classes(&self) { 14 | self.app.classes(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /papk/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "papk" 3 | version = "0.1.0" 4 | authors = ["Phodal Huang "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | zip = "0.5" 11 | abxml = "0.8.2" 12 | log = "0.4.11" 13 | failure = "0.1.8" 14 | 15 | [lib] 16 | name = "papk" 17 | path = "src/lib.rs" 18 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/rop/cst/std_constant_pool.rs: -------------------------------------------------------------------------------- 1 | use crate::dx::dex::rop::cst::constant::Constant; 2 | 3 | #[derive(Debug, Clone)] 4 | pub struct StdConstantPool { 5 | entries: Vec, 6 | } 7 | 8 | impl StdConstantPool { 9 | pub fn new() -> StdConstantPool { 10 | StdConstantPool { entries: vec![] } 11 | } 12 | 13 | pub fn size(&self) -> usize { 14 | self.entries.len() 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/service_loader_rewriter.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::ir::code::ir_code::IRCode; 3 | 4 | pub struct ServiceLoaderRewriter { 5 | app_view: AppView, 6 | } 7 | 8 | impl ServiceLoaderRewriter { 9 | pub fn new(app_view: AppView) -> ServiceLoaderRewriter { 10 | ServiceLoaderRewriter { app_view } 11 | } 12 | 13 | pub fn rewrite(&self, code: IRCode) {} 14 | } 15 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/cf/direct/file_bytes_consumer.rs: -------------------------------------------------------------------------------- 1 | use crate::dx::command::dexer::process_file_bytes; 2 | use std::path::PathBuf; 3 | 4 | pub struct FileBytesConsumer {} 5 | 6 | impl FileBytesConsumer { 7 | pub fn new() -> FileBytesConsumer { 8 | FileBytesConsumer {} 9 | } 10 | 11 | pub fn process_file_bytes(&self, name: PathBuf, bytes: Vec) { 12 | process_file_bytes(name, bytes); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/lambda_rewriter.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::ir::code::ir_code::IRCode; 3 | 4 | #[derive(Clone, Debug)] 5 | pub struct LambdaRewriter { 6 | pub app_view: AppView, 7 | } 8 | 9 | impl LambdaRewriter { 10 | pub fn new(app_view: AppView) -> LambdaRewriter { 11 | LambdaRewriter { app_view } 12 | } 13 | 14 | pub fn desugar_lambdas(&self, code: IRCode) {} 15 | } 16 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_annotation_element.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_string::DexString; 2 | use crate::r8::graph::dex_value::DexValue; 3 | 4 | #[derive(Debug, Clone)] 5 | pub struct DexAnnotationElement { 6 | name: DexString, 7 | value: DexValue, 8 | } 9 | 10 | impl DexAnnotationElement { 11 | pub fn new(name: DexString, value: DexValue) -> DexAnnotationElement { 12 | DexAnnotationElement { name, value } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_annotation.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_encoded_annotation::DexEncodedAnnotation; 2 | 3 | #[derive(Debug, Clone)] 4 | pub struct DexAnnotation { 5 | visibility: i32, 6 | annotation: DexEncodedAnnotation, 7 | } 8 | 9 | impl DexAnnotation { 10 | pub fn new(visibility: i32, annotation: DexEncodedAnnotation) -> DexAnnotation { 11 | DexAnnotation { 12 | visibility, 13 | annotation, 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/conversion/one_time_method_processor.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::graph::program_method::ProgramMethod; 3 | 4 | pub struct OneTimeMethodProcessor { 5 | pub method: ProgramMethod, 6 | pub app_view: AppView, 7 | } 8 | 9 | impl OneTimeMethodProcessor { 10 | pub fn create(method: ProgramMethod, app_view: AppView) -> OneTimeMethodProcessor { 11 | OneTimeMethodProcessor { method, app_view } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/code/ir_code.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::graph::code::{Code, CodeClone}; 3 | use crate::r8::graph::program_method::ProgramMethod; 4 | 5 | #[derive(Clone, Debug)] 6 | pub struct IRCode { 7 | pub method: ProgramMethod, 8 | } 9 | 10 | impl IRCode { 11 | pub fn new(method: ProgramMethod) -> IRCode { 12 | IRCode { method } 13 | } 14 | 15 | pub fn context(&self) -> ProgramMethod { 16 | self.method.clone() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /pr8/src/r8/d8_command.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::d8_builder::D8Builder; 2 | use crate::r8::utils::android_app::AndroidApp; 3 | 4 | pub struct D8Command { 5 | pub(crate) app: AndroidApp, 6 | } 7 | 8 | impl D8Command { 9 | pub fn new() -> D8Command { 10 | D8Command { 11 | app: AndroidApp::new(), 12 | } 13 | } 14 | 15 | pub fn builder() -> D8Builder { 16 | let builder = D8Builder::new(); 17 | builder.app.build(); 18 | builder 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_encoded_annotation.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_annotation_element::DexAnnotationElement; 2 | use crate::r8::graph::dex_type::DexType; 3 | 4 | #[derive(Debug, Clone)] 5 | pub struct DexEncodedAnnotation { 6 | dex_type: DexType, 7 | elements: Vec, 8 | } 9 | 10 | impl DexEncodedAnnotation { 11 | pub fn new(dex_type: DexType, elements: Vec) -> DexEncodedAnnotation { 12 | DexEncodedAnnotation { dex_type, elements } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/lens_code_rewriter.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::graph::program_method::ProgramMethod; 3 | use crate::r8::ir::code::ir_code::IRCode; 4 | 5 | #[derive(Clone, Debug)] 6 | pub struct LensCodeRewriter { 7 | pub app_view: AppView, 8 | } 9 | 10 | impl LensCodeRewriter { 11 | pub fn new(app_view: AppView) -> LensCodeRewriter { 12 | LensCodeRewriter { app_view } 13 | } 14 | 15 | pub fn rewrite(&self, code: IRCode, context: ProgramMethod) {} 16 | } 17 | -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- 1 | tests: 2 | cargo test 3 | 4 | tests-ci: 5 | cargo test 6 | 7 | build: 8 | cargo build 9 | 10 | @bench: 11 | cargo bench 12 | 13 | @lint: 14 | rustup component add clippy 15 | rustup component add rustfmt 16 | cargo clippy -- -D warnings 17 | cargo clippy --tests 18 | cargo fmt -- --check 19 | 20 | @fix: 21 | cargo fmt --all 22 | 23 | clean: 24 | cargo clean 25 | find . -type f -name "*.orig" -exec rm {} \; 26 | find . -type f -name "*.bk" -exec rm {} \; 27 | find . -type f -name ".*~" -exec rm {} \; 28 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/parameter_annotations_list.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_annotation_set::DexAnnotationSet; 2 | 3 | #[derive(Debug, Clone)] 4 | pub struct ParameterAnnotationsList { 5 | values: Vec, 6 | missing_parameter_annotations: i32, 7 | } 8 | 9 | impl ParameterAnnotationsList { 10 | pub fn new(values: Vec) -> ParameterAnnotationsList { 11 | ParameterAnnotationsList { 12 | values, 13 | missing_parameter_annotations: 0, 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /_fixtures/c/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | gcc -o hello hello.c 3 | ``` 4 | 5 | macOS requirements: 6 | 7 | ``` 8 | brew install binutils 9 | ``` 10 | 11 | run 12 | 13 | ``` 14 | readelf -h chello 15 | ``` 16 | 17 | macOS: 18 | 19 | ``` 20 | gobjdump -p hello 21 | 22 | hello: file format mach-o-x86-64 23 | MACH-O header: 24 | magic: 0xfeedfacf 25 | cputype: 0x1000007 (X86_64) 26 | cpusubtype: 0x3 (X86_ALL) 27 | filetype: 0x2 28 | ncmds: 0x10 29 | sizeocmds: 0x558 30 | flags: 0x200085 31 | version: 2 32 | ``` -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_method.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_proto::DexProto; 2 | use crate::r8::graph::dex_string::DexString; 3 | use crate::r8::graph::dex_type::DexType; 4 | 5 | #[derive(Debug, Clone)] 6 | pub struct DexMethod { 7 | holder: DexType, 8 | proto: DexProto, 9 | name: DexString, 10 | } 11 | 12 | impl DexMethod { 13 | pub fn new(holder: DexType, proto: DexProto, name: DexString) -> DexMethod { 14 | DexMethod { 15 | holder, 16 | proto, 17 | name, 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /pr8/src/r8/dex/application_reader.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_application::DexApplication; 2 | use crate::r8::utils::android_app::AndroidApp; 3 | 4 | pub struct ApplicationReader { 5 | app: AndroidApp, 6 | } 7 | 8 | impl ApplicationReader { 9 | pub fn new(app: AndroidApp) -> ApplicationReader { 10 | ApplicationReader { app } 11 | } 12 | 13 | pub fn read(&self) -> DexApplication { 14 | let builder = DexApplication::builder(); 15 | let application = builder.build(); 16 | 17 | application 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/lambda_merger.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::graph::program_method::ProgramMethod; 3 | use crate::r8::ir::code::ir_code::IRCode; 4 | use crate::r8::ir::inliner::Inliner; 5 | 6 | #[derive(Clone, Debug)] 7 | pub struct LambdaMerger { 8 | pub app_view: AppView, 9 | } 10 | 11 | impl LambdaMerger { 12 | pub fn new(app_view: AppView) -> LambdaMerger { 13 | LambdaMerger { app_view } 14 | } 15 | 16 | pub fn rewrite_code(&self, method: ProgramMethod, code: IRCode, inliner: Inliner) {} 17 | } 18 | -------------------------------------------------------------------------------- /pr8/src/r8/d8_command_parser.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::d8_builder::D8Builder; 2 | use crate::r8::d8_command::D8Command; 3 | 4 | pub struct D8CommandParser {} 5 | 6 | impl D8CommandParser { 7 | pub fn new() -> D8CommandParser { 8 | D8CommandParser {} 9 | } 10 | 11 | pub fn parse(&self, options: Vec) -> D8Builder { 12 | let mut builder = D8Command::builder(); 13 | // do something in builder parser 14 | builder.add_program_files(String::from("")); 15 | builder.set_intermediate(true); 16 | builder 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/string_optimizer.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::ir::code::ir_code::IRCode; 3 | 4 | pub struct StringOptimizer { 5 | pub app_view: AppView, 6 | } 7 | 8 | impl StringOptimizer { 9 | pub fn new(app_view: AppView) -> StringOptimizer { 10 | StringOptimizer { app_view } 11 | } 12 | 13 | pub fn rewrite_class_get_name(&self, app_view: AppView, code: IRCode) {} 14 | pub fn compute_trivial_operations_on_const_string(&self, code: IRCode) {} 15 | pub fn remove_trivial_conversions(&self, code: IRCode) {} 16 | } 17 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_proto.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_string::DexString; 2 | use crate::r8::graph::dex_type::DexType; 3 | use crate::r8::graph::dex_type_list::DexTypeList; 4 | 5 | #[derive(Debug, Clone)] 6 | pub struct DexProto { 7 | shorty: DexString, 8 | return_type: DexType, 9 | parameters: DexTypeList, 10 | } 11 | 12 | impl DexProto { 13 | pub fn new(shorty: DexString, return_type: DexType, parameters: DexTypeList) -> DexProto { 14 | DexProto { 15 | shorty, 16 | return_type, 17 | parameters, 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/lazy_loaded_dex_application.rs: -------------------------------------------------------------------------------- 1 | #[derive(Clone, Debug)] 2 | pub struct LazyLoadedDexApplication {} 3 | 4 | impl LazyLoadedDexApplication { 5 | pub fn new() -> LazyLoadedDexApplication { 6 | LazyLoadedDexApplication {} 7 | } 8 | } 9 | 10 | pub struct LazyLoadedDexApplicationBuilder {} 11 | 12 | impl LazyLoadedDexApplicationBuilder { 13 | pub fn new() -> LazyLoadedDexApplicationBuilder { 14 | LazyLoadedDexApplicationBuilder {} 15 | } 16 | 17 | pub fn build(&self) -> LazyLoadedDexApplication { 18 | LazyLoadedDexApplication::new() 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /pdx/src/dx/command/class_translator_task.rs: -------------------------------------------------------------------------------- 1 | use crate::dx::command::dexer::translate_class; 2 | use crate::dx::dex::cf::direct::direct_class_file::DirectClassFile; 3 | use std::path::PathBuf; 4 | 5 | pub struct ClassTranslatorTask { 6 | name: PathBuf, 7 | bytes: Vec, 8 | pub cf: DirectClassFile, 9 | } 10 | 11 | impl ClassTranslatorTask { 12 | pub fn new(name: PathBuf, bytes: Vec, cf: DirectClassFile) -> ClassTranslatorTask { 13 | ClassTranslatorTask { name, bytes, cf } 14 | } 15 | 16 | pub fn call(&self) { 17 | translate_class(self.bytes.clone(), self.cf.clone()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod code; 2 | pub mod method_access_flags; 3 | pub mod method_collection; 4 | pub mod parameter_annotations_list; 5 | pub mod program_method; 6 | 7 | pub mod dex_method; 8 | pub mod dex_string; 9 | pub mod dex_type; 10 | pub mod dex_value; 11 | 12 | pub mod dex_annotation; 13 | pub mod dex_annotation_element; 14 | pub mod dex_annotation_set; 15 | 16 | pub mod dex_proto; 17 | pub mod dex_type_list; 18 | 19 | pub mod dex_encoded_annotation; 20 | pub mod dex_encoded_method; 21 | 22 | pub mod app_info; 23 | pub mod app_view; 24 | pub mod dex_application; 25 | pub mod dex_program_class; 26 | pub mod lazy_loaded_dex_application; 27 | -------------------------------------------------------------------------------- /src/cmd/cmd_papk.rs: -------------------------------------------------------------------------------- 1 | use crate::highlight::highlight_out; 2 | use papk::get_content_by_file; 3 | 4 | pub fn cmd_papk(str: String) { 5 | let result = get_content_by_file(str, String::from("AndroidManifest.xml")); 6 | match result { 7 | Ok(str) => { 8 | highlight_out(str.as_str(), "xml"); 9 | } 10 | Err(_) => { 11 | println!("parse xml error"); 12 | } 13 | } 14 | } 15 | 16 | #[cfg(test)] 17 | mod tests { 18 | use crate::cmd_papk; 19 | 20 | #[test] 21 | #[ignore] 22 | fn test_main_parse_apk_binary() { 23 | cmd_papk(String::from("../_fixtures/apk/app-release-unsigned.apk")); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /pdx/src/dx/command/class_parser_task.rs: -------------------------------------------------------------------------------- 1 | use crate::dx::dex::cf::direct::direct_class_file::DirectClassFile; 2 | use std::path::PathBuf; 3 | 4 | #[derive(Debug, Clone)] 5 | pub struct ClassParserTask { 6 | name: PathBuf, 7 | bytes: Vec, 8 | } 9 | 10 | impl ClassParserTask { 11 | pub fn new(name: PathBuf, bytes: Vec) -> ClassParserTask { 12 | ClassParserTask { 13 | name: name, 14 | bytes: bytes, 15 | } 16 | } 17 | 18 | pub fn call(&self) -> DirectClassFile { 19 | let cf = DirectClassFile::new(self.name.clone(), self.bytes.clone()); 20 | cf.set_attribute_factory(); 21 | cf.get_magic(); 22 | cf 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/cmd/cmd_unpack.rs: -------------------------------------------------------------------------------- 1 | use abxml::apk::Apk; 2 | use std::path::Path; 3 | 4 | pub fn cmd_unpack(str: String) -> Result<(), failure::Error> { 5 | let path = Path::new(&str); 6 | 7 | let mut apk = Apk::from_path(&path)?; 8 | let output = Path::new("apk_output/"); 9 | let result = apk.export(output, true); 10 | match result { 11 | Ok(_) => {} 12 | Err(err) => { 13 | println!("{:?}", err); 14 | } 15 | } 16 | 17 | Ok(()) 18 | } 19 | 20 | #[cfg(test)] 21 | mod tests { 22 | use crate::cmd::cmd_unpack::cmd_unpack; 23 | 24 | #[test] 25 | fn test_unpack_apk_binary() { 26 | cmd_unpack(String::from("_fixtures/apk/app-release-unsigned.apk")); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "decoder" 3 | version = "0.1.0" 4 | authors = ["Phodal Huang "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | clap = "3.0.0-beta.1" 11 | syntect = "4.2" 12 | failure = "0.1.8" 13 | 14 | abxml = "0.8.2" 15 | 16 | dex = "0.4.0" 17 | tempfile = "3.1.0" 18 | memmap = "0.7.0" 19 | 20 | [dependencies.papk] 21 | path = "papk" 22 | 23 | [dependencies.pclass] 24 | path = "pclass" 25 | 26 | [dependencies.pdex] 27 | path = "pdex" 28 | 29 | [workspace] 30 | members = [ 31 | "pdex", 32 | "pelf", 33 | "poat", 34 | "pclass", 35 | "papk", 36 | "pdx", 37 | "pr8" 38 | ] 39 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/program_method.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::graph::dex_encoded_method::DexEncodedMethod; 3 | use crate::r8::graph::dex_program_class::DexProgramClass; 4 | use crate::r8::ir::code::ir_code::IRCode; 5 | 6 | #[derive(Clone, Debug)] 7 | pub struct ProgramMethod { 8 | pub(crate) holder: DexProgramClass, 9 | pub(crate) method: DexEncodedMethod, 10 | } 11 | 12 | impl ProgramMethod { 13 | pub fn new(holder: DexProgramClass, method: DexEncodedMethod) -> ProgramMethod { 14 | ProgramMethod { holder, method } 15 | } 16 | 17 | pub fn build_ir(&self, app_view: AppView) -> IRCode { 18 | let ir_code = IRCode::new(self.clone()); 19 | ir_code 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /pclass/src/lib.rs: -------------------------------------------------------------------------------- 1 | use pclass_parser::classfile::ClassFile; 2 | use pclass_parser::parse_class as pclass_parser; 3 | 4 | pub fn parse_class(input: &[u8]) -> nom::IResult<&[u8], ClassFile> { 5 | pclass_parser(input) 6 | } 7 | 8 | #[cfg(test)] 9 | mod tests { 10 | use crate::parse_class; 11 | use std::fs; 12 | use std::path::Path; 13 | 14 | #[test] 15 | fn test_parse_class() { 16 | let path = Path::new("../_fixtures/java/hello/HelloWorld.class"); 17 | let buffer = fs::read(path).unwrap(); 18 | let result = parse_class(buffer.as_ref()); 19 | match result { 20 | Ok((_, class)) => assert_eq!(52, class.version.major), 21 | Err(_) => {} 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/inliner.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::ir::lambda_merger::LambdaMerger; 3 | use crate::r8::ir::lambda_rewriter::LambdaRewriter; 4 | use crate::r8::ir::lens_code_rewriter::LensCodeRewriter; 5 | 6 | #[derive(Clone, Debug)] 7 | pub struct Inliner { 8 | pub lens_code_rewriter: LensCodeRewriter, 9 | pub app_view: AppView, 10 | pub lambda_merger: LambdaMerger, 11 | } 12 | 13 | impl Inliner { 14 | pub fn new( 15 | app_view: AppView, 16 | lens_code_rewriter: LensCodeRewriter, 17 | lambda_merger: LambdaMerger, 18 | ) -> Inliner { 19 | Inliner { 20 | app_view, 21 | lens_code_rewriter, 22 | lambda_merger, 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /pr8/src/r8/jar/cf_application_writer.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::graph::dex_application::DexApplication; 3 | use crate::r8::support::class_file_consumer::{ClassFileConsumer, ForwardingConsumer}; 4 | 5 | pub struct CfApplicationWriter { 6 | app: DexApplication, 7 | app_view: AppView, 8 | } 9 | 10 | impl CfApplicationWriter { 11 | pub fn new(app: DexApplication, app_view: AppView) -> CfApplicationWriter { 12 | CfApplicationWriter { app, app_view } 13 | } 14 | 15 | pub fn write_application(&self, consumer: Box) {} 16 | 17 | pub fn write(&self) { 18 | let consumer = ForwardingConsumer::new(); 19 | self.write_application(Box::from(consumer)) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /pdx/src/dx/command/cf_translator.rs: -------------------------------------------------------------------------------- 1 | use crate::dx::dex::cf::direct::direct_class_file::DirectClassFile; 2 | use crate::dx::dex::file::class_def_item::ClassDefItem; 3 | 4 | pub struct CfTranslator {} 5 | 6 | impl CfTranslator { 7 | pub fn process_fields() {} 8 | 9 | pub fn process_methods() {} 10 | 11 | pub fn translate0(bytes: Vec, cf: DirectClassFile) -> ClassDefItem { 12 | let out = ClassDefItem::new(); 13 | CfTranslator::process_fields(); 14 | CfTranslator::process_methods(); 15 | 16 | let cp_size = cf.get_constant_pool().size(); 17 | for i in 0..cp_size - 1 {} 18 | out 19 | } 20 | 21 | pub fn translate(bytes: Vec, cf: DirectClassFile) -> ClassDefItem { 22 | CfTranslator::translate0(bytes, cf) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/code.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::graph::program_method::ProgramMethod; 3 | use core::fmt; 4 | 5 | pub trait CodeClone { 6 | fn clone_box(&self) -> Box; 7 | } 8 | 9 | impl CodeClone for T 10 | where 11 | T: 'static + Code + Clone, 12 | { 13 | fn clone_box(&self) -> Box { 14 | Box::new(self.clone()) 15 | } 16 | } 17 | 18 | impl Clone for Box { 19 | fn clone(&self) -> Box { 20 | self.clone_box() 21 | } 22 | } 23 | 24 | impl fmt::Debug for dyn Code { 25 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 26 | write!(f, "Hi") 27 | } 28 | } 29 | 30 | pub trait Code: CodeClone { 31 | fn build_ir(&self, method: ProgramMethod, app_view: AppView); 32 | } 33 | -------------------------------------------------------------------------------- /src/highlight.rs: -------------------------------------------------------------------------------- 1 | use syntect::easy::HighlightLines; 2 | use syntect::highlighting::{Style, ThemeSet}; 3 | use syntect::parsing::SyntaxSet; 4 | use syntect::util::{as_24_bit_terminal_escaped, LinesWithEndings}; 5 | 6 | pub fn highlight_out(s: &str, ext: &str) { 7 | // Load these once at the start of your program 8 | let ps = SyntaxSet::load_defaults_newlines(); 9 | let ts = ThemeSet::load_defaults(); 10 | 11 | let syntax = ps.find_syntax_by_extension(ext).unwrap(); 12 | let mut h = HighlightLines::new(syntax, &ts.themes["base16-ocean.dark"]); 13 | for line in LinesWithEndings::from(s) { 14 | let ranges: Vec<(Style, &str)> = h.highlight(line, &ps); 15 | let escaped = as_24_bit_terminal_escaped(&ranges[..], true); 16 | println!("{}", escaped); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/code_rewriter.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::ir::code::ir_code::IRCode; 3 | 4 | pub struct CodeRewriter { 5 | pub app_view: AppView, 6 | } 7 | 8 | impl CodeRewriter { 9 | pub fn new(app_view: AppView) -> CodeRewriter { 10 | CodeRewriter { app_view } 11 | } 12 | 13 | pub fn rewrite_known_array_length_calls(&self, code: IRCode) {} 14 | pub fn rewrite_assertion_error_two_argument_constructor(&self, code: IRCode) {} 15 | pub fn common_subexpression_elimination(&self, code: IRCode) {} 16 | pub fn simplify_array_construction(&self, code: IRCode) {} 17 | pub fn rewrite_move_result(&self, code: IRCode) {} 18 | pub fn split_range_invoke_constants(&self, code: IRCode) {} 19 | pub fn optimize_always_throwing_instructions(&self, code: IRCode) {} 20 | } 21 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/file/class_def_item.rs: -------------------------------------------------------------------------------- 1 | use crate::dx::dex::file::encoded_method::EncodedMethod; 2 | use crate::dx::dex::rop::cst::cst_string::CstString; 3 | use crate::dx::dex::rop::cst::cst_type::CstType; 4 | use crate::dx::dex::rop::iface::type_list::TypeList; 5 | 6 | pub struct ClassDefItem { 7 | this_class: CstType, 8 | access_flags: i32, 9 | superclass: CstType, 10 | interfaces: TypeList, 11 | sourcefile: CstString, 12 | methods: Vec, 13 | } 14 | 15 | impl ClassDefItem { 16 | pub fn new() -> ClassDefItem { 17 | ClassDefItem { 18 | this_class: CstType {}, 19 | access_flags: 0, 20 | superclass: CstType {}, 21 | interfaces: TypeList {}, 22 | sourcefile: CstString {}, 23 | methods: vec![], 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /pdx/src/dx/command/direct_class_file_consumer.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | 3 | use crate::dx::command::class_def_item_consumer::ClassDefItemConsumer; 4 | use crate::dx::command::class_translator_task::ClassTranslatorTask; 5 | use crate::dx::command::dexer::rotate_dex_file; 6 | use crate::dx::dex::cf::direct::direct_class_file::DirectClassFile; 7 | 8 | pub struct DirectClassFileConsumer { 9 | name: PathBuf, 10 | bytes: Vec, 11 | } 12 | 13 | impl DirectClassFileConsumer { 14 | pub fn new(name: PathBuf, bytes: Vec) -> DirectClassFileConsumer { 15 | DirectClassFileConsumer { name, bytes } 16 | } 17 | 18 | pub fn call(&self, class: DirectClassFile) { 19 | rotate_dex_file(); 20 | 21 | let task = ClassTranslatorTask::new(self.name.clone(), self.bytes.clone(), class); 22 | task.call(); 23 | ClassDefItemConsumer::new(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_encoded_method.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::code::Code; 2 | use crate::r8::graph::dex_annotation_set::DexAnnotationSet; 3 | use crate::r8::graph::dex_method::DexMethod; 4 | use crate::r8::graph::method_access_flags::MethodAccessFlags; 5 | use crate::r8::graph::parameter_annotations_list::ParameterAnnotationsList; 6 | 7 | #[derive(Debug, Clone)] 8 | pub struct DexEncodedMethod { 9 | method: DexMethod, 10 | access_flags: MethodAccessFlags, 11 | annotations: DexAnnotationSet, 12 | parameter_annotations_list: ParameterAnnotationsList, 13 | pub(crate) code: Box, 14 | } 15 | 16 | impl DexEncodedMethod { 17 | pub fn new() {} 18 | 19 | pub fn is_class_initializer(&self) -> bool { 20 | // self.access_flags.is_constructor(); 21 | return false; 22 | } 23 | 24 | pub fn get_code(&self) -> Box { 25 | return self.code.clone(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/method_collection.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_encoded_method::DexEncodedMethod; 2 | use crate::r8::graph::dex_program_class::DexProgramClass; 3 | 4 | #[derive(Debug, Clone)] 5 | pub struct MethodCollection { 6 | holder: Box, 7 | direct_methods: Vec, 8 | virtual_methods: Vec, 9 | } 10 | 11 | impl MethodCollection { 12 | pub fn new( 13 | holder: Box, 14 | direct_methods: Vec, 15 | virtual_methods: Vec, 16 | ) -> MethodCollection { 17 | MethodCollection { 18 | holder, 19 | direct_methods, 20 | virtual_methods, 21 | } 22 | } 23 | 24 | pub fn get_class_initializer(&self) -> Option { 25 | for method in &self.direct_methods { 26 | if method.is_class_initializer() { 27 | return Some(method.clone()); 28 | } 29 | } 30 | 31 | None 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_application.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_program_class::DexProgramClass; 2 | use crate::r8::graph::lazy_loaded_dex_application::LazyLoadedDexApplicationBuilder; 3 | 4 | #[derive(Clone, Debug)] 5 | pub struct DexApplication {} 6 | 7 | impl DexApplication { 8 | pub fn new() -> DexApplication { 9 | DexApplication {} 10 | } 11 | 12 | pub fn builder() -> DexApplicationBuilder { 13 | let builder = DexApplicationBuilder::new(); 14 | builder 15 | } 16 | 17 | pub fn classes(&self) -> Vec { 18 | let classes: Vec = vec![]; 19 | classes 20 | } 21 | } 22 | 23 | #[derive(Clone, Debug)] 24 | pub struct DexApplicationBuilder { 25 | pub app: DexApplication, 26 | } 27 | 28 | impl DexApplicationBuilder { 29 | pub fn new() -> DexApplicationBuilder { 30 | let application = DexApplication::new(); 31 | DexApplicationBuilder { app: application } 32 | } 33 | pub fn build(&self) -> DexApplication { 34 | self.app.clone() 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #[macro_use] 2 | extern crate failure; 3 | 4 | use clap::{App, Arg}; 5 | 6 | use crate::cmd::cmd_papk::cmd_papk; 7 | use crate::cmd::cmd_pclass::cmd_pclass; 8 | use crate::cmd::cmd_unpack::cmd_unpack; 9 | 10 | mod cmd; 11 | 12 | mod highlight; 13 | 14 | fn main() { 15 | let papk_opt = Arg::with_name("papk").long("papk").takes_value(true); 16 | let pclass_opt = Arg::with_name("pclass").long("pclass").takes_value(true); 17 | let unpack_opt = Arg::with_name("unpack").long("unpack").takes_value(true); 18 | 19 | let app = App::new("decoder") 20 | .version("0.0.1") 21 | .arg(papk_opt) 22 | .arg(pclass_opt) 23 | .arg(unpack_opt); 24 | 25 | let matches = app.get_matches(); 26 | 27 | if let Some(str) = matches.value_of("papk") { 28 | cmd_papk(String::from(str)); 29 | } 30 | 31 | if let Some(str) = matches.value_of("pclass") { 32 | cmd_pclass(String::from(str)); 33 | } 34 | 35 | if let Some(str) = matches.value_of("unpack_opt") { 36 | cmd_unpack(String::from(str)); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/cf/direct/class_path_opener.rs: -------------------------------------------------------------------------------- 1 | use std::fs; 2 | use std::fs::File; 3 | use std::path::PathBuf; 4 | 5 | use crate::dx::dex::cf::direct::file_bytes_consumer::FileBytesConsumer; 6 | 7 | pub struct ClassPathOpener { 8 | pathname: String, 9 | pub consumer: FileBytesConsumer, 10 | } 11 | 12 | impl ClassPathOpener { 13 | pub fn new(pathname: String) -> ClassPathOpener { 14 | ClassPathOpener { 15 | pathname, 16 | consumer: FileBytesConsumer::new(), 17 | } 18 | } 19 | 20 | pub fn process_directory(&self, path: PathBuf) {} 21 | 22 | pub fn process_archive(&self, path: PathBuf) {} 23 | 24 | pub fn process_one(&self, path: PathBuf) { 25 | if path.is_dir() { 26 | return self.process_directory(path); 27 | } 28 | 29 | if path.ends_with(".zip") || path.ends_with(".jar") || path.ends_with(".apk") { 30 | return self.process_archive(path); 31 | } 32 | 33 | let data = fs::read(path.clone()).expect("Unable to read file"); 34 | self.consumer.process_file_bytes(path, data); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /pdex/src/lib.rs: -------------------------------------------------------------------------------- 1 | extern crate dex; 2 | 3 | use std::path::PathBuf; 4 | 5 | use dex::{Dex, DexReader}; 6 | use memmap::Mmap; 7 | 8 | pub fn parse_dex_from_file(file: &PathBuf) -> Option> { 9 | let result = DexReader::from_file(file); 10 | match result { 11 | Ok(data) => Some(data), 12 | Err(_) => None, 13 | } 14 | } 15 | 16 | #[cfg(test)] 17 | mod tests { 18 | use std::path::{Path, PathBuf}; 19 | 20 | use crate::parse_dex_from_file; 21 | 22 | #[test] 23 | fn test_parse_apk_binary() { 24 | let string = String::from("../_fixtures/java/hello/classes.dex"); 25 | let file = Path::new(&string); 26 | let mmap = parse_dex_from_file(&PathBuf::from(file)); 27 | let result = mmap.unwrap().find_class_by_name("LHelloWorld;"); 28 | 29 | let class = result.expect("Result failed").expect("Class failed"); 30 | 31 | let str = class.source_file().unwrap(); 32 | assert_eq!("HelloWorld.java", &str.to_string()); 33 | let methods = class.methods(); 34 | let mut count = 0; 35 | for method in methods { 36 | count = count + 1; 37 | } 38 | assert_eq!(2, count); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /pelf/src/lib.rs: -------------------------------------------------------------------------------- 1 | use goblin::{error, Object}; 2 | use std::fs; 3 | use std::path::Path; 4 | 5 | pub fn parse_buffer(path: &Path) -> error::Result<()> { 6 | let buffer = fs::read(path)?; 7 | match Object::parse(&buffer)? { 8 | Object::Elf(elf) => { 9 | println!("elf: {:#?}", &elf); 10 | } 11 | Object::PE(pe) => { 12 | println!("pe: {:#?}", &pe); 13 | } 14 | Object::Mach(mach) => { 15 | println!("mach: {:#?}", &mach); 16 | } 17 | Object::Archive(archive) => { 18 | println!("archive: {:#?}", &archive); 19 | } 20 | Object::Unknown(magic) => println!("unknown magic: {:#x}", magic), 21 | } 22 | Ok(()) 23 | } 24 | 25 | #[cfg(test)] 26 | mod tests { 27 | use crate::parse_buffer; 28 | use std::path::Path; 29 | 30 | #[test] 31 | fn test_parse_c_binary() { 32 | let path = Path::new("../_fixtures/c/hello"); 33 | parse_buffer(path); 34 | assert_eq!(true, true) 35 | } 36 | 37 | #[test] 38 | fn test_parse_rust_binary() { 39 | let path = Path::new("../_fixtures/rust/hello"); 40 | parse_buffer(path); 41 | assert_eq!(true, true) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /pr8/src/r8/d8.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::d8_command_parser::D8CommandParser; 2 | use crate::r8::dex::application_reader::ApplicationReader; 3 | use crate::r8::graph::app_info::AppInfo; 4 | use crate::r8::graph::app_view::AppView; 5 | use crate::r8::ir::ir_converter::IRConverter; 6 | use crate::r8::jar::cf_application_writer::CfApplicationWriter; 7 | use crate::r8::utils::android_app::AndroidApp; 8 | 9 | pub struct D8 {} 10 | 11 | impl D8 { 12 | pub fn new() -> D8 { 13 | D8 {} 14 | } 15 | 16 | pub fn start() { 17 | let mut options = vec![]; 18 | options.push(String::from("")); 19 | let parser = D8CommandParser::new().parse(options); 20 | let command = parser.build(); 21 | let app = command.app; 22 | D8::run(app) 23 | } 24 | 25 | fn run(input_app: AndroidApp) { 26 | let reader = ApplicationReader::new(input_app.clone()); 27 | let mut app = reader.read(); 28 | 29 | let app_info = AppInfo::new(app.clone()); 30 | let app_view = AppView::create_for_d8(app_info.clone()); 31 | 32 | let converter = IRConverter::new(app_view.clone()); 33 | app = converter.convert(app); 34 | 35 | let writer = CfApplicationWriter::new(app, app_view); 36 | writer.write(); 37 | app_info.classes(); 38 | } 39 | } 40 | 41 | #[cfg(test)] 42 | mod tests { 43 | use crate::r8::d8::D8; 44 | 45 | #[test] 46 | fn test_urn() { 47 | D8::start(); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /pdx/src/dx/command/dexer.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | 3 | use crate::dx::command::cf_translator::CfTranslator; 4 | use crate::dx::command::class_parser_task::ClassParserTask; 5 | use crate::dx::command::direct_class_file_consumer::DirectClassFileConsumer; 6 | use crate::dx::dex::cf::direct::direct_class_file::DirectClassFile; 7 | use crate::dx::dex::file::class_def_item::ClassDefItem; 8 | use crate::dx::dex::file::dex_file::DexFile; 9 | 10 | pub fn create_dex_file() { 11 | let output_dex = DexFile::new(); 12 | process_one(); 13 | } 14 | 15 | pub fn rotate_dex_file() { 16 | create_dex_file(); 17 | } 18 | 19 | pub fn process_one() {} 20 | 21 | pub fn check_class_name(name: PathBuf) {} 22 | 23 | pub fn process_class(name: PathBuf, bytes: Vec) { 24 | check_class_name(name.clone()); 25 | 26 | let consumer = DirectClassFileConsumer::new(name.clone(), bytes.clone()); 27 | let parser_task = ClassParserTask::new(name, bytes); 28 | let class_file = parser_task.call(); 29 | consumer.call(class_file); 30 | } 31 | 32 | pub fn process_file_bytes(name: PathBuf, bytes: Vec) -> bool { 33 | let is_class = name.ends_with(".class"); 34 | let is_classes_dex = name.to_path_buf().as_os_str().to_os_string() == "classes.dex"; 35 | 36 | if !is_class && !is_classes_dex { 37 | return false; 38 | } 39 | 40 | process_class(name, bytes); 41 | return true; 42 | } 43 | 44 | pub fn translate_class(byte: Vec, cf: DirectClassFile) -> ClassDefItem { 45 | CfTranslator::translate(byte, cf) 46 | } 47 | -------------------------------------------------------------------------------- /pr8/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, the R8 project authors. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /pr8/src/r8/d8_builder.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::d8_command::D8Command; 2 | use crate::r8::utils::android_app::AndroidApp; 3 | use std::borrow::Borrow; 4 | use std::fs; 5 | use std::path::PathBuf; 6 | 7 | #[derive(Clone)] 8 | pub struct D8Builder { 9 | pub(crate) app: AndroidApp, 10 | intermediate: bool, 11 | synthesized_class_prefix: String, 12 | enable_main_dex_list_check: bool, 13 | minimal_main_dex: bool, 14 | program_files: Vec, 15 | } 16 | 17 | impl D8Builder { 18 | pub fn new() -> D8Builder { 19 | D8Builder { 20 | app: AndroidApp::new(), 21 | intermediate: false, 22 | synthesized_class_prefix: "".to_string(), 23 | enable_main_dex_list_check: false, 24 | minimal_main_dex: false, 25 | program_files: vec![], 26 | } 27 | } 28 | 29 | pub fn set_intermediate(&mut self, value: bool) { 30 | self.intermediate = value; 31 | } 32 | 33 | pub fn add_program_files(&mut self, str: String) { 34 | let paths = fs::read_dir("./").unwrap(); 35 | for dir in paths { 36 | let path = dir.unwrap().path(); 37 | 38 | if path.is_file() { 39 | &self.app.add_program_file(path.clone()); 40 | &self.program_files.push(path.clone()); 41 | } 42 | } 43 | } 44 | 45 | pub fn make_command(&self) -> D8Command { 46 | let mut command = D8Command::new(); 47 | command.app = self.app.clone(); 48 | command 49 | } 50 | 51 | pub fn build(&self) -> D8Command { 52 | self.make_command() 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/cmd/cmd_pclass.rs: -------------------------------------------------------------------------------- 1 | use dex::Dex; 2 | use memmap::Mmap; 3 | use papk::get_classes_dex; 4 | use pdex::parse_dex_from_file; 5 | use std::fs; 6 | use std::fs::File; 7 | use std::io::Write; 8 | use tempfile::tempdir; 9 | 10 | pub fn cmd_pclass(str: String) -> Result, failure::Error> { 11 | let result = get_classes_dex(String::from(str)); 12 | let dir = tempdir()?; 13 | 14 | let decoder_dir = dir.path().join("decoder"); 15 | fs::create_dir(decoder_dir.to_path_buf())?; 16 | let file_path = decoder_dir.join("classes.dex"); 17 | let mut file = File::create(file_path.clone())?; 18 | 19 | if let Ok(bytes) = result { 20 | file.write(&bytes); 21 | 22 | let option = parse_dex_from_file(&file_path); 23 | 24 | drop(file); 25 | dir.close()?; 26 | 27 | return match option { 28 | None => bail!("could not parse dex"), 29 | Some(mmap) => { 30 | for cr in mmap.classes() { 31 | if let Ok(class) = cr { 32 | println!("{:?}", class.source_file()); 33 | } 34 | } 35 | Ok(mmap) 36 | } 37 | }; 38 | } 39 | 40 | println!("could not find classes.dex"); 41 | drop(file); 42 | dir.close()?; 43 | 44 | bail!("could not find classes.dex") 45 | } 46 | 47 | #[cfg(test)] 48 | mod tests { 49 | use crate::cmd::cmd_pclass::cmd_pclass; 50 | 51 | #[test] 52 | fn test_parse_class_binary() { 53 | let mmap = cmd_pclass(String::from("_fixtures/apk/app-release-unsigned.apk")); 54 | if let Ok(dex) = mmap { 55 | for cr in dex.classes() { 56 | if let Ok(class) = cr { 57 | println!("{:?}", class.source_file()); 58 | } 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /pr8/src/r8/graph/dex_program_class.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_encoded_method::DexEncodedMethod; 2 | use crate::r8::graph::method_collection::MethodCollection; 3 | 4 | #[derive(Debug, Clone)] 5 | pub struct DexProgramClass { 6 | this_type: String, 7 | origin_kind: String, 8 | origin: String, 9 | access_flags: String, 10 | super_type: String, 11 | interfaces: String, 12 | source_file: String, 13 | nest_host: String, 14 | nest_members: String, 15 | enclosing_member: String, 16 | inner_classes: String, 17 | class_annotations: String, 18 | static_fields: String, 19 | instance_fields: String, 20 | pub direct_methods: Vec, 21 | pub virtual_methods: Vec, 22 | 23 | method_collection: Option, 24 | } 25 | 26 | impl DexProgramClass { 27 | pub fn new( 28 | direct_methods: Vec, 29 | virtual_methods: Vec, 30 | ) -> DexProgramClass { 31 | let mut class = DexProgramClass { 32 | this_type: "".to_string(), 33 | origin_kind: "".to_string(), 34 | origin: "".to_string(), 35 | access_flags: "".to_string(), 36 | super_type: "".to_string(), 37 | interfaces: "".to_string(), 38 | source_file: "".to_string(), 39 | nest_host: "".to_string(), 40 | nest_members: "".to_string(), 41 | enclosing_member: "".to_string(), 42 | inner_classes: "".to_string(), 43 | class_annotations: "".to_string(), 44 | static_fields: "".to_string(), 45 | instance_fields: "".to_string(), 46 | direct_methods: direct_methods.clone(), 47 | virtual_methods: virtual_methods.clone(), 48 | method_collection: None, 49 | }; 50 | 51 | let collection = 52 | MethodCollection::new(Box::from(class.clone()), direct_methods, virtual_methods); 53 | class.method_collection = Option::from(collection); 54 | 55 | class 56 | } 57 | 58 | pub fn get_class_initializer(&self) -> Option { 59 | let collection = self.method_collection.as_ref().unwrap(); 60 | collection.get_class_initializer() 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /pdx/src/dx/dex/cf/direct/direct_class_file.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | 3 | use crate::dx::dex::rop::cst::cst_type::CstType; 4 | use crate::dx::dex::rop::cst::std_constant_pool::StdConstantPool; 5 | use crate::dx::dex::rop::iface::field_list::FieldList; 6 | use crate::dx::dex::rop::iface::method_list::MethodList; 7 | use crate::dx::dex::rop::iface::std_attribute_list::StdAttributeList; 8 | use crate::dx::dex::rop::iface::type_list::TypeList; 9 | 10 | #[derive(Debug, Clone)] 11 | pub struct DirectClassFile { 12 | name: PathBuf, 13 | bytes: Vec, 14 | 15 | constant_pool: StdConstantPool, 16 | minor_version: i32, 17 | major_version: i32, 18 | access_flags: i32, 19 | magic: i32, 20 | this_class: CstType, 21 | super_class: CstType, 22 | interfaces: TypeList, 23 | fields: FieldList, 24 | methods: MethodList, 25 | attributes: StdAttributeList, 26 | } 27 | 28 | impl DirectClassFile { 29 | pub fn new(name: PathBuf, bytes: Vec) -> DirectClassFile { 30 | DirectClassFile { 31 | name, 32 | bytes, 33 | constant_pool: StdConstantPool::new(), 34 | minor_version: 0, 35 | major_version: 0, 36 | access_flags: 0, 37 | magic: 0, 38 | this_class: CstType::new(), 39 | super_class: CstType::new(), 40 | interfaces: TypeList {}, 41 | fields: FieldList {}, 42 | methods: MethodList {}, 43 | attributes: StdAttributeList {}, 44 | } 45 | } 46 | 47 | pub fn set_attribute_factory(&self) {} 48 | 49 | pub fn is_good_magic(&self, magic: i32) -> bool { 50 | return true; 51 | } 52 | 53 | pub fn get_magic0(&self) -> i32 { 54 | return 0; 55 | } 56 | 57 | pub fn parse0(&self) { 58 | if self.bytes.len() < 10 { 59 | // throw error 60 | } 61 | if self.is_good_magic(self.get_magic0()) {} 62 | //todo: is good version 63 | } 64 | 65 | pub fn parse_to_interfaces_if_necessary(&self) { 66 | self.parse0(); 67 | } 68 | 69 | pub fn get_magic(&self) -> u8 { 70 | self.parse_to_interfaces_if_necessary(); 71 | self.bytes[0] 72 | } 73 | 74 | pub fn get_source_file(&self) {} 75 | 76 | pub fn get_constant_pool(&self) -> StdConstantPool { 77 | self.constant_pool.clone() 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /pr8/src/r8/utils/android_app.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::dex_program_class::DexProgramClass; 2 | use std::path::PathBuf; 3 | 4 | pub trait ProviderClone { 5 | fn clone_box(&self) -> Box; 6 | } 7 | 8 | impl ProviderClone for T 9 | where 10 | T: 'static + ClassFileResourceProvider + Clone, 11 | { 12 | fn clone_box(&self) -> Box { 13 | Box::new(self.clone()) 14 | } 15 | } 16 | 17 | // We can now implement Clone manually by forwarding to clone_box. 18 | impl Clone for Box { 19 | fn clone(&self) -> Box { 20 | self.clone_box() 21 | } 22 | } 23 | 24 | pub trait ClassFileResourceProvider: ProviderClone { 25 | fn get_class_descriptors(&self); 26 | fn get_program_resource(&self); 27 | } 28 | 29 | #[derive(Clone)] 30 | pub struct AndroidApp { 31 | classpath_resource_providers: Vec>, 32 | library_resource_providers: Vec>, 33 | } 34 | 35 | impl AndroidApp { 36 | pub fn new() -> AndroidApp { 37 | AndroidApp { 38 | classpath_resource_providers: vec![], 39 | library_resource_providers: vec![], 40 | } 41 | } 42 | 43 | fn is_file_by_type(path_buf: PathBuf, suffix: String) -> bool { 44 | // path_buf.as_path().ends_with(suffix) 45 | return true; 46 | } 47 | 48 | // todo: implement it 49 | fn is_class_file(path_buf: PathBuf) -> bool { 50 | return false; 51 | } 52 | fn is_aar_file(path_buf: PathBuf) -> bool { 53 | return false; 54 | } 55 | fn is_archive(path_buf: PathBuf) -> bool { 56 | return false; 57 | } 58 | 59 | pub fn add_program_file(&self, path_buf: PathBuf) -> &AndroidApp { 60 | if AndroidApp::is_file_by_type(path_buf.clone(), String::from(".dex")) { 61 | self.add_program_resources(); 62 | } else if AndroidApp::is_class_file(path_buf.clone()) { 63 | self.add_program_resources(); 64 | } else if AndroidApp::is_aar_file(path_buf.clone()) { 65 | self.add_program_resource_provider(); 66 | } else if AndroidApp::is_archive(path_buf.clone()) { 67 | self.add_program_resource_provider(); 68 | } else { 69 | panic!("error") 70 | } 71 | 72 | return self; 73 | } 74 | 75 | fn add_program_resources(&self) {} 76 | fn add_program_resource_provider(&self) {} 77 | 78 | //Build final AndroidApp. 79 | pub fn build(&self) -> AndroidApp { 80 | let classpath_resource_providers = self.classpath_resource_providers.clone(); 81 | let library_resource_providers = self.library_resource_providers.clone(); 82 | 83 | // some things in here 84 | AndroidApp { 85 | classpath_resource_providers, 86 | library_resource_providers, 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /papk/src/lib.rs: -------------------------------------------------------------------------------- 1 | extern crate abxml; 2 | extern crate zip; 3 | #[macro_use] 4 | extern crate failure; 5 | extern crate log; 6 | 7 | use abxml::encoder::Xml; 8 | use abxml::visitor::{Executor, ModelVisitor, Resources, XmlVisitor}; 9 | use failure::{bail, Error, ResultExt}; 10 | use std::io::{Cursor, Read}; 11 | 12 | #[derive(Debug, Clone)] 13 | pub enum ApkType { 14 | Xml { content: String }, 15 | Class { content: Vec }, 16 | } 17 | 18 | pub fn get_classes_dex(apk_path: String) -> Result, Error> { 19 | let mut class_dex: Vec = vec![]; 20 | 21 | let file = std::fs::File::open(&apk_path)?; 22 | let mut archive = zip::ZipArchive::new(file).unwrap(); 23 | archive 24 | .by_name("classes.dex") 25 | .unwrap() 26 | .read_to_end(&mut class_dex)?; 27 | 28 | if !class_dex.is_empty() { 29 | Ok(class_dex) 30 | } else { 31 | bail!("could not find classes.dex") 32 | } 33 | } 34 | 35 | pub fn get_content_by_file(apk_path: String, target_file: String) -> Result { 36 | let android_resources_content = abxml::STR_ARSC.to_owned(); 37 | 38 | let file = std::fs::File::open(&apk_path).unwrap(); 39 | let mut archive = zip::ZipArchive::new(file).unwrap(); 40 | 41 | let mut resources_content = Vec::new(); 42 | archive 43 | .by_name("resources.arsc") 44 | .unwrap() 45 | .read_to_end(&mut resources_content) 46 | .unwrap(); 47 | 48 | let mut resources_visitor = ModelVisitor::default(); 49 | Executor::arsc(&resources_content, &mut resources_visitor)?; 50 | Executor::arsc(&android_resources_content, &mut resources_visitor)?; 51 | 52 | for i in 0..archive.len() { 53 | let mut current_file = archive.by_index(i).unwrap(); 54 | 55 | if current_file.name().contains(&target_file) { 56 | { 57 | let mut xml_content = Vec::new(); 58 | current_file.read_to_end(&mut xml_content)?; 59 | let new_content = xml_content; 60 | 61 | let resources = resources_visitor.get_resources(); 62 | let out = 63 | parse_xml(&new_content, resources).context("could not decode target file")?; 64 | return Ok(out); 65 | } 66 | } 67 | } 68 | 69 | bail!("could not find results") 70 | } 71 | 72 | fn parse_xml<'a>(content: &[u8], resources: &'a Resources<'a>) -> Result { 73 | let cursor = Cursor::new(content); 74 | let mut visitor = XmlVisitor::new(resources); 75 | 76 | Executor::xml(cursor, &mut visitor)?; 77 | 78 | match *visitor.get_root() { 79 | Some(ref root) => match *visitor.get_string_table() { 80 | Some(_) => { 81 | let res = 82 | Xml::encode(visitor.get_namespaces(), root).context("could note encode XML")?; 83 | return Ok(res); 84 | } 85 | None => { 86 | println!("No string table found"); 87 | } 88 | }, 89 | None => { 90 | println!("No root on target XML"); 91 | } 92 | } 93 | 94 | bail!("could not decode XML") 95 | } 96 | 97 | #[cfg(test)] 98 | mod tests { 99 | use crate::{get_classes_dex, get_content_by_file}; 100 | 101 | #[test] 102 | fn test_parse_zip_file() { 103 | let result = get_content_by_file( 104 | String::from("../_fixtures/apk/app-release-unsigned.apk"), 105 | String::from("AndroidManifest.xml"), 106 | ); 107 | if let Ok(str) = result { 108 | assert_eq!(true, str.contains("com.phodal.myapplication")); 109 | } 110 | } 111 | 112 | #[test] 113 | fn test_get_classes_dex() { 114 | let result = get_classes_dex(String::from("../_fixtures/apk/app-release-unsigned.apk")); 115 | if let Ok(bytes) = result { 116 | assert_eq!(true, bytes.len() > 0); 117 | } 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /pr8/src/r8/ir/ir_converter.rs: -------------------------------------------------------------------------------- 1 | use crate::r8::graph::app_view::AppView; 2 | use crate::r8::graph::dex_application::{DexApplication, DexApplicationBuilder}; 3 | use crate::r8::graph::dex_encoded_method::DexEncodedMethod; 4 | use crate::r8::graph::dex_program_class::DexProgramClass; 5 | use crate::r8::graph::lazy_loaded_dex_application::LazyLoadedDexApplicationBuilder; 6 | use crate::r8::graph::program_method::ProgramMethod; 7 | use crate::r8::ir::code::ir_code::IRCode; 8 | use crate::r8::ir::code_rewriter::CodeRewriter; 9 | use crate::r8::ir::conversion::one_time_method_processor::OneTimeMethodProcessor; 10 | use crate::r8::ir::inliner::Inliner; 11 | use crate::r8::ir::lambda_merger::LambdaMerger; 12 | use crate::r8::ir::lambda_rewriter::LambdaRewriter; 13 | use crate::r8::ir::lens_code_rewriter::LensCodeRewriter; 14 | use crate::r8::ir::service_loader_rewriter::ServiceLoaderRewriter; 15 | use crate::r8::ir::string_optimizer::StringOptimizer; 16 | use std::ptr::null; 17 | use std::time::Instant; 18 | 19 | pub struct IRConverter { 20 | app_view: AppView, 21 | pub lens_code_rewriter: LensCodeRewriter, 22 | pub lambda_rewriter: LambdaRewriter, 23 | pub inliner: Inliner, 24 | pub lambda_merger: LambdaMerger, 25 | pub service_loader_rewriter: ServiceLoaderRewriter, 26 | pub code_rewriter: CodeRewriter, 27 | pub string_optimizer: StringOptimizer, 28 | } 29 | 30 | impl IRConverter { 31 | pub fn new(app_view: AppView) -> IRConverter { 32 | let lens_code_rewriter = LensCodeRewriter::new(app_view.clone()); 33 | let code_rewriter = CodeRewriter::new(app_view.clone()); 34 | let lambda_rewriter = LambdaRewriter::new(app_view.clone()); 35 | let lambda_merger = LambdaMerger::new(app_view.clone()); 36 | let inliner = Inliner::new( 37 | app_view.clone(), 38 | lens_code_rewriter.clone(), 39 | lambda_merger.clone(), 40 | ); 41 | let service_loader_rewriter = ServiceLoaderRewriter::new(app_view.clone()); 42 | let string_optimizer = StringOptimizer::new(app_view.clone()); 43 | IRConverter { 44 | app_view, 45 | lens_code_rewriter, 46 | lambda_rewriter, 47 | lambda_merger, 48 | inliner, 49 | service_loader_rewriter, 50 | code_rewriter, 51 | string_optimizer, 52 | } 53 | } 54 | 55 | pub fn rewrite_code(&self, method: ProgramMethod, processor: OneTimeMethodProcessor) { 56 | let code = method.build_ir(self.app_view.clone()); 57 | self.optimize(code, processor) 58 | } 59 | 60 | pub fn optimize(&self, code: IRCode, processor: OneTimeMethodProcessor) { 61 | let context = code.context(); 62 | let method = context.clone().method; 63 | let holder = context.clone().holder; 64 | 65 | println!( 66 | "Initial (SSA) flow graph {:?}", 67 | Instant::now().elapsed().as_secs() 68 | ); 69 | 70 | println!("Lens rewrite"); 71 | self.lens_code_rewriter.rewrite(code.clone(), context); 72 | 73 | println!("Desugar lambdas"); 74 | self.lambda_rewriter.desugar_lambdas(code.clone()); 75 | 76 | println!("Merge lambdas"); 77 | self.lambda_merger 78 | .rewrite_code(code.context(), code.clone(), self.inliner.clone()); 79 | 80 | println!("Rewrite service loaders"); 81 | self.service_loader_rewriter.rewrite(code.clone()); 82 | 83 | // todo: add more rewriter 84 | 85 | // string 86 | self.string_optimizer 87 | .rewrite_class_get_name(self.app_view.clone(), code.clone()); 88 | self.string_optimizer 89 | .compute_trivial_operations_on_const_string(code.clone()); 90 | self.string_optimizer 91 | .remove_trivial_conversions(code.clone()); 92 | 93 | // code rewriter 94 | self.code_rewriter 95 | .rewrite_known_array_length_calls(code.clone()); 96 | self.code_rewriter 97 | .rewrite_assertion_error_two_argument_constructor(code.clone()); 98 | self.code_rewriter 99 | .common_subexpression_elimination(code.clone()); 100 | self.code_rewriter.simplify_array_construction(code.clone()); 101 | self.code_rewriter.rewrite_move_result(code.clone()); 102 | self.code_rewriter 103 | .split_range_invoke_constants(code.clone()); 104 | self.code_rewriter 105 | .optimize_always_throwing_instructions(code.clone()); 106 | } 107 | pub fn convert_method(&self, method: ProgramMethod) { 108 | // let definition = method.get_definition(); 109 | // if definition.get_code() { 110 | let processor = OneTimeMethodProcessor::create(method.clone(), self.app_view.clone()); 111 | self.rewrite_code(method, processor); 112 | // } 113 | } 114 | 115 | pub fn convert_methods(&self, clazz: DexProgramClass) { 116 | let option = clazz.clone().get_class_initializer(); 117 | match option { 118 | None => {} 119 | Some(method) => { 120 | let init_method = ProgramMethod::new(clazz.clone(), method); 121 | self.convert_method(init_method) 122 | } 123 | } 124 | for d_method in clazz.clone().direct_methods { 125 | let method1 = ProgramMethod::new(clazz.clone(), d_method); 126 | self.convert_method(method1) 127 | } 128 | for v_method in clazz.clone().virtual_methods { 129 | let method2 = ProgramMethod::new(clazz.clone(), v_method); 130 | self.convert_method(method2) 131 | } 132 | } 133 | 134 | pub fn convert(&self, app: DexApplication) -> DexApplication { 135 | println!("IR conversion: {}", Instant::now().elapsed().as_secs()); 136 | for clazz in app.classes() { 137 | self.convert_methods(clazz); 138 | } 139 | 140 | let builder = DexApplication::builder(); 141 | 142 | self.desugar_nest_based_access(builder.clone()); 143 | self.synthesize_lambda_classes(builder.clone()); 144 | self.desugar_interface_methods(builder.clone()); 145 | self.synthesize_twr_close_resource_utility_class(builder.clone()); 146 | self.synthesize_java8utility_class(builder.clone()); 147 | self.synthesize_retarget_class(builder.clone()); 148 | 149 | self.process_covariant_return_type_annotations(builder.clone()); 150 | self.generate_desugared_library_apiwrappers(builder.clone()); 151 | 152 | self.handle_synthesized_class_mapping(builder.clone()); 153 | 154 | println!("IR end: {}", Instant::now().elapsed().as_secs()); 155 | 156 | builder.build() 157 | } 158 | 159 | pub fn desugar_nest_based_access(&self, builder: DexApplicationBuilder) {} 160 | pub fn synthesize_lambda_classes(&self, builder: DexApplicationBuilder) {} 161 | pub fn desugar_interface_methods(&self, builder: DexApplicationBuilder) {} 162 | pub fn synthesize_twr_close_resource_utility_class(&self, builder: DexApplicationBuilder) {} 163 | pub fn synthesize_java8utility_class(&self, builder: DexApplicationBuilder) {} 164 | pub fn synthesize_retarget_class(&self, builder: DexApplicationBuilder) {} 165 | pub fn process_covariant_return_type_annotations(&self, builder: DexApplicationBuilder) {} 166 | pub fn generate_desugared_library_apiwrappers(&self, builder: DexApplicationBuilder) {} 167 | pub fn handle_synthesized_class_mapping(&self, builder: DexApplicationBuilder) {} 168 | } 169 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Decoder 2 | 3 | > research for .class, oat, elf & oat format file for compiler. 4 | 5 | ## Usage 6 | 7 | - [x] papk: unpack apk 8 | - [ ] poat: unpack oat 9 | - [ ] pelf: unpack elf 10 | - [ ] pdex: unpack dex 11 | - [ ] pclass: unpack class 12 | 13 | ``` 14 | decoder --papk _fixtures/apk/app-release-unsigned.apk 15 | ``` 16 | 17 | related project: 18 | 19 | #### [JADX](https://github.com/skylot/jadx) 20 | 21 | - Command line and GUI tools for producing Java source code from Android Dex and Apk files 22 | 23 | #### [Androguard](https://github.com/androguard/androguard) 24 | 25 | Androguard is a full python tool to play with Android files. 26 | 27 | - DEX, ODEX 28 | - APK 29 | - Android's binary xml 30 | - Android resources 31 | - Disassemble DEX/ODEX bytecodes 32 | - Decompiler for DEX/ODEX files 33 | 34 | Horks: 35 | 36 | - [Simli](https://github.com/Zke1ev3n/BakkSmali) is a python tool that can transfrom dex file to smali text.And it's forked form the dex parser writed by yanfeng.wyf.It still has some problems. 37 | 38 | ## Library 39 | 40 | - [Apktool](https://github.com/iBotPeaches/Apktool) is A tool for reverse engineering Android apk files. 41 | 42 | ### Dalvik 43 | 44 | Documents: 45 | 46 | - [Creating a Dalvik parser in Rust](https://superanalyzer.rocks/2016/10/18/dalvik-parser-1) 47 | - [Reverse engineering and penetration testing on Android apps: my own list of tools](https://www.andreafortuna.org/2019/07/18/reverse-engineering-and-penetration-testing-on-android-apps-my-own-list-of-tools/) 48 | 49 | Library: 50 | 51 | - [https://github.com/mdeg/dexparser](https://github.com/mdeg/dexparser) A Rust library for parsing Android's DEX file format with parser combinators. 52 | - [https://github.com/letmutx/dex-parser](https://github.com/letmutx/dex-parser) Rust parser for Android's dex format. 53 | - [https://github.com/SUPERAndroidAnalyzer/dalvik](https://github.com/SUPERAndroidAnalyzer/dalvik) Dalvik parser in pure Rust. 54 | 55 | Converter 56 | 57 | - [SmaliEx](https://github.com/testwhat/SmaliEx) A wrapper to get de-optimized dex from odex/oat/vdex. 58 | - [dex2jar](https://github.com/pxb1988/dex2jar) Tools to work with android .dex and java .class files. 59 | - [GJoy Dex Analysizer](https://github.com/charles2gan/GDA-android-reversing-Tool) GDA is a new decompiler written entirely in c++, so it does not rely on the Java platform, which is succinct, portable and fast, and supports APK, DEX, ODEX, oat. 60 | 61 | ### ELF 62 | 63 | - [Falcon](https://github.com/falconre/falcon) is a formal binary analysis framework in Rust. 64 | - [panopticon](https://gitlab.com/p8n/panopticon) A libre program analysis library for machine code. 65 | - [libgoblin](https://github.com/m4b/goblin) An impish, cross-platform binary parsing crate, written in Rust. 66 | - [https://github.com/aep/elfkit](https://github.com/aep/elfkit) An elf read and manipulation library in pure Rust (written from scratch, no bfd, no gnu code, no license infections), intended to be used in binary manipulation utils such as strip, chrpath, objcopy and ld. The end goal is to build a well designed library that facilitates all sorts of binary manipulation magic. 67 | 68 | ### Core 69 | 70 | [panopticon](https://gitlab.com/p8n/panopticon) is a libre program analysis library for machine code. 71 | 72 | - Disassemble AMD64/x86, AVR, MOS 6502 and MIPS (WIP). 73 | - Open PE and ELF files. 74 | - Translate code to RREIL, a reverse engineering focused intermediate language in Single Static Assignment form (including memory operations). 75 | - Construct control flow graphs and compute liveness information for each basic block. 76 | - Interpolate stack pointer values using Guilfanov's method. 77 | - Compute function summaries and substitute call sites with them. 78 | - Run Abstract Interpretation analysis with fixed cardinality sets, strided intervals and Value Sets. 79 | - Propagate constants, recover local variables and resolve indirect jumps. 80 | 81 | [Falcon](https://github.com/falconre/falcon) is a formal binary analysis framework in Rust. 82 | 83 | - Expression-based IL with strong influences from RREIL and Binary Ninja's LLIL. 84 | - Semantically-equivalent binary translators for 32/64-bit x86, Mips, and Mipsel. 85 | - Lifters for ELF and PE via goblin. 86 | - Fixed-point engine for data-flow analysis and abstract interpretation. 87 | - Performant memory models for analysis. 88 | - A concrete executor over Falcon IL. 89 | 90 | ### Proguard 91 | 92 | - [Rust Proguard Parser](https://github.com/getsentry/rust-proguard) 93 | 94 | ### APK 95 | 96 | - [https://github.com/avast/apkparser](https://github.com/avast/apkparser) is a APK manifest & resources parsing in Golang. 97 | 98 | ### Resources 99 | 100 | - [https://github.com/imager-io/imager](https://github.com/imager-io/imager) Automated image compression for efficiently distributing images on the web. 101 | - [https://github.com/LiweiGogoing/resourcesParse](https://github.com/LiweiGogoing/resourcesParse) 102 | 103 | #### Documents 104 | 105 | - [Android 手把手分析resources.arsc](https://juejin.im/post/5d4e60c15188255d2a78b86d) 106 | 107 | ![Resources.arsc](docs/android/resource-arsc-spec.png) 108 | 109 | ### Class 110 | 111 | - [smali/baksmali](https://github.com/JesusFreke/smali) is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. 112 | - [https://github.com/ollide/intellij-java2smali](https://github.com/ollide/intellij-java2smali) Simple plugin for IntelliJ IDEA & Android Studio to easily compile Java & Kotlin files to smali. 113 | 114 | ## Documents 115 | 116 | - linux -> [Smallest x86 ELF Hello World](http://timelessname.com/elfbin/) 117 | - [ELF Hello World Tutorial](https://cirosantilli.com/elf-hello-world) 118 | 119 | Video: 120 | 121 | - [The Teensy ELF Executable](https://www.muppetlabs.com/~breadbox/software/tiny/techtalk.html) 122 | 123 | ### Videos Tools 124 | 125 | `script`, `scriptreplay`, `recordmydesktop`, `audacity`, `pitivi`, and `ffmpeg`. 126 | 127 | ## Specification 128 | 129 | - [Dalvik Executable format](https://source.android.com/devices/tech/dalvik/dex-format) 130 | 131 | ## Logs 132 | 133 | ``` 134 | apktool d _fixtures/apk/app-release-unsigned.apk 135 | 136 | I: Using Apktool 2.4.1 on app-release-unsigned.apk 137 | I: Loading resource table... 138 | I: Decoding AndroidManifest.xml with resources... 139 | I: Loading resource table from file: /Users/fdhuang/Library/apktool/framework/1.apk 140 | I: Regular manifest package... 141 | I: Decoding file-resources... 142 | I: Decoding values */* XMLs... 143 | I: Baksmaling classes.dex... 144 | I: Copying assets and libs... 145 | I: Copying unknown files... 146 | I: Copying original files... 147 | ``` 148 | 149 | ### Dex 150 | 151 | | 名称 | 格式 | 说明 | 152 | | --- | --- | --- | 153 | | header | header_item | 标头 | 154 | | string_ids | string_id_item[] | 字符串标识符列表。这些是此文件使用的所有字符串的标识符,用于内部命名(例如类型描述符)或用作代码引用的常量对象。此列表必须使用 UTF-16 代码点值按字符串内容进行排序(不采用语言区域敏感方式),且不得包含任何重复条目。 | 155 | | type_ids | type_id_item[] | 类型标识符列表。这些是此文件引用的所有类型(类、数组或原始类型)的标识符(无论文件中是否已定义)。此列表必须按 `string_id` 索引进行排序,且不得包含任何重复条目。 | 156 | | proto_ids | proto_id_item[] | 方法原型标识符列表。这些是此文件引用的所有原型的标识符。此列表必须按返回类型(按 `type_id` 索引排序)主要顺序进行排序,然后按参数列表(按 `type_id` 索引排序的各个参数,采用字典排序方法)进行排序。该列表不得包含任何重复条目。 | 157 | | field_ids | field_id_item[] | 字段标识符列表。这些是此文件引用的所有字段的标识符(无论文件中是否已定义)。此列表必须进行排序,其中定义类型(按 `type_id` 索引排序)是主要顺序,字段名称(按 `string_id` 索引排序)是中间顺序,而类型(按 `type_id` 索引排序)是次要顺序。该列表不得包含任何重复条目。 | 158 | | method_ids | method_id_item[] | 方法标识符列表。这些是此文件引用的所有方法的标识符(无论文件中是否已定义)。此列表必须进行排序,其中定义类型(按 `type_id` 索引排序)是主要顺序,方法名称(按 `string_id` 索引排序)是中间顺序,而方法原型(按 `proto_id` 索引排序)是次要顺序。该列表不得包含任何重复条目。 | 159 | | class_defs | class_def_item[] | 类定义列表。这些类必须进行排序,以便所指定类的超类和已实现的接口比引用类更早出现在该列表中。此外,对于在该列表中多次出现的同名类,其定义是无效的。 | 160 | | call_site_ids | call_site_id_item[] | 调用站点标识符列表。这些是此文件引用的所有调用站点的标识符(无论文件中是否已定义)。此列表必须按 `call_site_off` 以升序进行排序。 | 161 | | method_handles | method_handle_item[] | 方法句柄列表。此文件引用的所有方法句柄的列表(无论文件中是否已定义)。此列表未进行排序,而且可能包含将在逻辑上对应于不同方法句柄实例的重复项。 | 162 | | data | ubyte[] | 数据区,包含上面所列表格的所有支持数据。不同的项有不同的对齐要求;如有必要,则在每个项之前插入填充字节,以实现所需的对齐效果。 | 163 | | link_data | ubyte[] | 静态链接文件中使用的数据。本文档尚未指定本区段中数据的格式。此区段在未链接文件中为空,而运行时实现可能会在适当的情况下使用这些数据。 | 164 | 165 | License 166 | --- 167 | 168 | PR8 based on [https://r8.googlesource.com/r8](https://r8.googlesource.com/r8) with Apache 2.0 see in directory. 169 | 170 | [![Phodal's Idea](http://brand.phodal.com/shields/idea-small.svg)](http://ideas.phodal.com/) 171 | 172 | @ 2020 A [Phodal Huang](https://www.phodal.com)'s [Idea](http://github.com/phodal/ideas). This code is distributed under the MPL license. See `LICENSE` in this directory. 173 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "abxml" 5 | version = "0.8.2" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | dependencies = [ 8 | "ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", 9 | "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 10 | "encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 11 | "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 12 | "failure 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 13 | "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 14 | "xml-rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", 15 | "zip 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", 16 | ] 17 | 18 | [[package]] 19 | name = "addr2line" 20 | version = "0.13.0" 21 | source = "registry+https://github.com/rust-lang/crates.io-index" 22 | dependencies = [ 23 | "gimli 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", 24 | ] 25 | 26 | [[package]] 27 | name = "adler" 28 | version = "0.2.3" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | 31 | [[package]] 32 | name = "adler32" 33 | version = "1.1.0" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | 36 | [[package]] 37 | name = "aho-corasick" 38 | version = "0.7.13" 39 | source = "registry+https://github.com/rust-lang/crates.io-index" 40 | dependencies = [ 41 | "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 42 | ] 43 | 44 | [[package]] 45 | name = "ansi_term" 46 | version = "0.12.1" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | dependencies = [ 49 | "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 50 | ] 51 | 52 | [[package]] 53 | name = "arrayvec" 54 | version = "0.5.1" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | 57 | [[package]] 58 | name = "atty" 59 | version = "0.2.14" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | dependencies = [ 62 | "hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", 63 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 64 | "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 65 | ] 66 | 67 | [[package]] 68 | name = "autocfg" 69 | version = "1.0.0" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | 72 | [[package]] 73 | name = "backtrace" 74 | version = "0.3.50" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | dependencies = [ 77 | "addr2line 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", 78 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 79 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 80 | "miniz_oxide 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 81 | "object 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", 82 | "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 83 | ] 84 | 85 | [[package]] 86 | name = "base64" 87 | version = "0.12.3" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | 90 | [[package]] 91 | name = "bincode" 92 | version = "1.3.1" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | dependencies = [ 95 | "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 96 | "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", 97 | ] 98 | 99 | [[package]] 100 | name = "bitflags" 101 | version = "1.2.1" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | 104 | [[package]] 105 | name = "byteorder" 106 | version = "1.3.4" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | 109 | [[package]] 110 | name = "bzip2" 111 | version = "0.3.3" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | dependencies = [ 114 | "bzip2-sys 0.1.9+1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 115 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 116 | ] 117 | 118 | [[package]] 119 | name = "bzip2-sys" 120 | version = "0.1.9+1.0.8" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | dependencies = [ 123 | "cc 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)", 124 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 125 | "pkg-config 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", 126 | ] 127 | 128 | [[package]] 129 | name = "cc" 130 | version = "1.0.58" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | 133 | [[package]] 134 | name = "cesu8" 135 | version = "1.1.0" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | 138 | [[package]] 139 | name = "cfg-if" 140 | version = "0.1.10" 141 | source = "registry+https://github.com/rust-lang/crates.io-index" 142 | 143 | [[package]] 144 | name = "chrono" 145 | version = "0.4.13" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | dependencies = [ 148 | "num-integer 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 149 | "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", 150 | ] 151 | 152 | [[package]] 153 | name = "clap" 154 | version = "3.0.0-beta.1" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | dependencies = [ 157 | "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", 158 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 159 | "clap_derive 3.0.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", 160 | "indexmap 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 161 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 162 | "os_str_bytes 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 163 | "strsim 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 164 | "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 165 | "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 166 | "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 167 | "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", 168 | ] 169 | 170 | [[package]] 171 | name = "clap_derive" 172 | version = "3.0.0-beta.1" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | dependencies = [ 175 | "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 176 | "proc-macro-error 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 177 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 178 | "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 179 | "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", 180 | ] 181 | 182 | [[package]] 183 | name = "crc32fast" 184 | version = "1.2.0" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | dependencies = [ 187 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 188 | ] 189 | 190 | [[package]] 191 | name = "decoder" 192 | version = "0.1.0" 193 | dependencies = [ 194 | "abxml 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", 195 | "clap 3.0.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)", 196 | "dex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 197 | "failure 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 198 | "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 199 | "papk 0.1.0", 200 | "pclass 0.1.0", 201 | "pdex 0.1.0", 202 | "syntect 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 203 | "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 204 | ] 205 | 206 | [[package]] 207 | name = "dex" 208 | version = "0.4.0" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | dependencies = [ 211 | "adler32 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 212 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 213 | "cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 214 | "getset 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)", 215 | "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 216 | "lru 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", 217 | "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 218 | "num-derive 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 219 | "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", 220 | "scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", 221 | "scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", 222 | ] 223 | 224 | [[package]] 225 | name = "elf" 226 | version = "0.1.0" 227 | dependencies = [ 228 | "goblin 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 229 | ] 230 | 231 | [[package]] 232 | name = "encoding" 233 | version = "0.2.33" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | dependencies = [ 236 | "encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 237 | "encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 238 | "encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 239 | "encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 240 | "encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)", 241 | ] 242 | 243 | [[package]] 244 | name = "encoding-index-japanese" 245 | version = "1.20141219.5" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | dependencies = [ 248 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 249 | ] 250 | 251 | [[package]] 252 | name = "encoding-index-korean" 253 | version = "1.20141219.5" 254 | source = "registry+https://github.com/rust-lang/crates.io-index" 255 | dependencies = [ 256 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 257 | ] 258 | 259 | [[package]] 260 | name = "encoding-index-simpchinese" 261 | version = "1.20141219.5" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | dependencies = [ 264 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 265 | ] 266 | 267 | [[package]] 268 | name = "encoding-index-singlebyte" 269 | version = "1.20141219.5" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | dependencies = [ 272 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 273 | ] 274 | 275 | [[package]] 276 | name = "encoding-index-tradchinese" 277 | version = "1.20141219.5" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | dependencies = [ 280 | "encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 281 | ] 282 | 283 | [[package]] 284 | name = "encoding_index_tests" 285 | version = "0.1.4" 286 | source = "registry+https://github.com/rust-lang/crates.io-index" 287 | 288 | [[package]] 289 | name = "env_logger" 290 | version = "0.7.1" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | dependencies = [ 293 | "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", 294 | "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 295 | "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 296 | "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 297 | "termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 298 | ] 299 | 300 | [[package]] 301 | name = "failure" 302 | version = "0.1.8" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | dependencies = [ 305 | "backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)", 306 | "failure_derive 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 307 | ] 308 | 309 | [[package]] 310 | name = "failure_derive" 311 | version = "0.1.8" 312 | source = "registry+https://github.com/rust-lang/crates.io-index" 313 | dependencies = [ 314 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 315 | "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 316 | "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", 317 | "synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)", 318 | ] 319 | 320 | [[package]] 321 | name = "flate2" 322 | version = "1.0.16" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | dependencies = [ 325 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 326 | "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 327 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 328 | "miniz_oxide 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 329 | ] 330 | 331 | [[package]] 332 | name = "fnv" 333 | version = "1.0.7" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | 336 | [[package]] 337 | name = "getrandom" 338 | version = "0.1.14" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | dependencies = [ 341 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 342 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 343 | "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", 344 | ] 345 | 346 | [[package]] 347 | name = "getset" 348 | version = "0.0.9" 349 | source = "registry+https://github.com/rust-lang/crates.io-index" 350 | dependencies = [ 351 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 352 | "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 353 | "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", 354 | ] 355 | 356 | [[package]] 357 | name = "gimli" 358 | version = "0.22.0" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | 361 | [[package]] 362 | name = "goblin" 363 | version = "0.2.3" 364 | source = "registry+https://github.com/rust-lang/crates.io-index" 365 | dependencies = [ 366 | "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 367 | "plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 368 | "scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 369 | ] 370 | 371 | [[package]] 372 | name = "hashbrown" 373 | version = "0.5.0" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | 376 | [[package]] 377 | name = "hashbrown" 378 | version = "0.8.1" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | dependencies = [ 381 | "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 382 | ] 383 | 384 | [[package]] 385 | name = "heck" 386 | version = "0.3.1" 387 | source = "registry+https://github.com/rust-lang/crates.io-index" 388 | dependencies = [ 389 | "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 390 | ] 391 | 392 | [[package]] 393 | name = "hermit-abi" 394 | version = "0.1.15" 395 | source = "registry+https://github.com/rust-lang/crates.io-index" 396 | dependencies = [ 397 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 398 | ] 399 | 400 | [[package]] 401 | name = "humantime" 402 | version = "1.3.0" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | dependencies = [ 405 | "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 406 | ] 407 | 408 | [[package]] 409 | name = "indexmap" 410 | version = "1.5.0" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | dependencies = [ 413 | "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 414 | "hashbrown 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 415 | ] 416 | 417 | [[package]] 418 | name = "itoa" 419 | version = "0.4.6" 420 | source = "registry+https://github.com/rust-lang/crates.io-index" 421 | 422 | [[package]] 423 | name = "lazy_static" 424 | version = "1.4.0" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | 427 | [[package]] 428 | name = "lazycell" 429 | version = "1.2.1" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | 432 | [[package]] 433 | name = "lexical-core" 434 | version = "0.7.4" 435 | source = "registry+https://github.com/rust-lang/crates.io-index" 436 | dependencies = [ 437 | "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 438 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 439 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 440 | "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 441 | "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 442 | ] 443 | 444 | [[package]] 445 | name = "libc" 446 | version = "0.2.73" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | 449 | [[package]] 450 | name = "line-wrap" 451 | version = "0.1.1" 452 | source = "registry+https://github.com/rust-lang/crates.io-index" 453 | dependencies = [ 454 | "safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 455 | ] 456 | 457 | [[package]] 458 | name = "linked-hash-map" 459 | version = "0.5.3" 460 | source = "registry+https://github.com/rust-lang/crates.io-index" 461 | 462 | [[package]] 463 | name = "log" 464 | version = "0.4.11" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | dependencies = [ 467 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 468 | ] 469 | 470 | [[package]] 471 | name = "lru" 472 | version = "0.1.17" 473 | source = "registry+https://github.com/rust-lang/crates.io-index" 474 | dependencies = [ 475 | "hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 476 | ] 477 | 478 | [[package]] 479 | name = "memchr" 480 | version = "2.3.3" 481 | source = "registry+https://github.com/rust-lang/crates.io-index" 482 | 483 | [[package]] 484 | name = "memmap" 485 | version = "0.7.0" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | dependencies = [ 488 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 489 | "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 490 | ] 491 | 492 | [[package]] 493 | name = "miniz_oxide" 494 | version = "0.4.0" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | dependencies = [ 497 | "adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 498 | ] 499 | 500 | [[package]] 501 | name = "nom" 502 | version = "5.1.2" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | dependencies = [ 505 | "lexical-core 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", 506 | "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 507 | "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", 508 | ] 509 | 510 | [[package]] 511 | name = "num-derive" 512 | version = "0.2.5" 513 | source = "registry+https://github.com/rust-lang/crates.io-index" 514 | dependencies = [ 515 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 516 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 517 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 518 | ] 519 | 520 | [[package]] 521 | name = "num-integer" 522 | version = "0.1.43" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | dependencies = [ 525 | "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 526 | "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", 527 | ] 528 | 529 | [[package]] 530 | name = "num-traits" 531 | version = "0.2.12" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | dependencies = [ 534 | "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 535 | ] 536 | 537 | [[package]] 538 | name = "oat" 539 | version = "0.1.0" 540 | 541 | [[package]] 542 | name = "object" 543 | version = "0.20.0" 544 | source = "registry+https://github.com/rust-lang/crates.io-index" 545 | 546 | [[package]] 547 | name = "onig" 548 | version = "6.0.0" 549 | source = "registry+https://github.com/rust-lang/crates.io-index" 550 | dependencies = [ 551 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 552 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 553 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 554 | "onig_sys 69.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 555 | ] 556 | 557 | [[package]] 558 | name = "onig_sys" 559 | version = "69.5.0" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | dependencies = [ 562 | "cc 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)", 563 | "pkg-config 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)", 564 | ] 565 | 566 | [[package]] 567 | name = "os_str_bytes" 568 | version = "2.3.1" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | 571 | [[package]] 572 | name = "papk" 573 | version = "0.1.0" 574 | dependencies = [ 575 | "abxml 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", 576 | "failure 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 577 | "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 578 | "zip 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", 579 | ] 580 | 581 | [[package]] 582 | name = "pclass" 583 | version = "0.1.0" 584 | dependencies = [ 585 | "nom 5.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 586 | "pclass-parser 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 587 | ] 588 | 589 | [[package]] 590 | name = "pclass-parser" 591 | version = "0.1.0" 592 | source = "registry+https://github.com/rust-lang/crates.io-index" 593 | dependencies = [ 594 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 595 | "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 596 | "nom 5.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 597 | ] 598 | 599 | [[package]] 600 | name = "pdex" 601 | version = "0.1.0" 602 | dependencies = [ 603 | "dex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 604 | "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 605 | ] 606 | 607 | [[package]] 608 | name = "pdx" 609 | version = "0.1.0" 610 | dependencies = [ 611 | "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 612 | ] 613 | 614 | [[package]] 615 | name = "pkg-config" 616 | version = "0.3.18" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | 619 | [[package]] 620 | name = "plain" 621 | version = "0.2.3" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | 624 | [[package]] 625 | name = "plist" 626 | version = "1.0.0" 627 | source = "registry+https://github.com/rust-lang/crates.io-index" 628 | dependencies = [ 629 | "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", 630 | "chrono 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", 631 | "indexmap 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 632 | "line-wrap 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 633 | "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", 634 | "xml-rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", 635 | ] 636 | 637 | [[package]] 638 | name = "podio" 639 | version = "0.1.7" 640 | source = "registry+https://github.com/rust-lang/crates.io-index" 641 | 642 | [[package]] 643 | name = "ppv-lite86" 644 | version = "0.2.8" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | 647 | [[package]] 648 | name = "pr8" 649 | version = "0.1.0" 650 | dependencies = [ 651 | "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 652 | ] 653 | 654 | [[package]] 655 | name = "proc-macro-error" 656 | version = "0.4.12" 657 | source = "registry+https://github.com/rust-lang/crates.io-index" 658 | dependencies = [ 659 | "proc-macro-error-attr 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 660 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 661 | "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 662 | "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", 663 | "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", 664 | ] 665 | 666 | [[package]] 667 | name = "proc-macro-error-attr" 668 | version = "0.4.12" 669 | source = "registry+https://github.com/rust-lang/crates.io-index" 670 | dependencies = [ 671 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 672 | "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 673 | "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", 674 | "syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 675 | "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", 676 | ] 677 | 678 | [[package]] 679 | name = "proc-macro2" 680 | version = "0.4.30" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | dependencies = [ 683 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 684 | ] 685 | 686 | [[package]] 687 | name = "proc-macro2" 688 | version = "1.0.19" 689 | source = "registry+https://github.com/rust-lang/crates.io-index" 690 | dependencies = [ 691 | "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 692 | ] 693 | 694 | [[package]] 695 | name = "quick-error" 696 | version = "1.2.3" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | 699 | [[package]] 700 | name = "quote" 701 | version = "0.6.13" 702 | source = "registry+https://github.com/rust-lang/crates.io-index" 703 | dependencies = [ 704 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 705 | ] 706 | 707 | [[package]] 708 | name = "quote" 709 | version = "1.0.7" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | dependencies = [ 712 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 713 | ] 714 | 715 | [[package]] 716 | name = "rand" 717 | version = "0.7.3" 718 | source = "registry+https://github.com/rust-lang/crates.io-index" 719 | dependencies = [ 720 | "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", 721 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 722 | "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 723 | "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 724 | "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 725 | ] 726 | 727 | [[package]] 728 | name = "rand_chacha" 729 | version = "0.2.2" 730 | source = "registry+https://github.com/rust-lang/crates.io-index" 731 | dependencies = [ 732 | "ppv-lite86 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 733 | "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 734 | ] 735 | 736 | [[package]] 737 | name = "rand_core" 738 | version = "0.5.1" 739 | source = "registry+https://github.com/rust-lang/crates.io-index" 740 | dependencies = [ 741 | "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", 742 | ] 743 | 744 | [[package]] 745 | name = "rand_hc" 746 | version = "0.2.0" 747 | source = "registry+https://github.com/rust-lang/crates.io-index" 748 | dependencies = [ 749 | "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 750 | ] 751 | 752 | [[package]] 753 | name = "redox_syscall" 754 | version = "0.1.57" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | 757 | [[package]] 758 | name = "regex" 759 | version = "1.3.9" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | dependencies = [ 762 | "aho-corasick 0.7.13 (registry+https://github.com/rust-lang/crates.io-index)", 763 | "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 764 | "regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", 765 | "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 766 | ] 767 | 768 | [[package]] 769 | name = "regex-syntax" 770 | version = "0.6.18" 771 | source = "registry+https://github.com/rust-lang/crates.io-index" 772 | 773 | [[package]] 774 | name = "remove_dir_all" 775 | version = "0.5.3" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | dependencies = [ 778 | "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 779 | ] 780 | 781 | [[package]] 782 | name = "rustc-demangle" 783 | version = "0.1.16" 784 | source = "registry+https://github.com/rust-lang/crates.io-index" 785 | 786 | [[package]] 787 | name = "rustc_version" 788 | version = "0.2.3" 789 | source = "registry+https://github.com/rust-lang/crates.io-index" 790 | dependencies = [ 791 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 792 | ] 793 | 794 | [[package]] 795 | name = "ryu" 796 | version = "1.0.5" 797 | source = "registry+https://github.com/rust-lang/crates.io-index" 798 | 799 | [[package]] 800 | name = "safemem" 801 | version = "0.3.3" 802 | source = "registry+https://github.com/rust-lang/crates.io-index" 803 | 804 | [[package]] 805 | name = "same-file" 806 | version = "1.0.6" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | dependencies = [ 809 | "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 810 | ] 811 | 812 | [[package]] 813 | name = "scroll" 814 | version = "0.9.2" 815 | source = "registry+https://github.com/rust-lang/crates.io-index" 816 | dependencies = [ 817 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 818 | ] 819 | 820 | [[package]] 821 | name = "scroll" 822 | version = "0.10.1" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | dependencies = [ 825 | "scroll_derive 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", 826 | ] 827 | 828 | [[package]] 829 | name = "scroll_derive" 830 | version = "0.9.5" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | dependencies = [ 833 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 834 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 835 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 836 | ] 837 | 838 | [[package]] 839 | name = "scroll_derive" 840 | version = "0.10.2" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | dependencies = [ 843 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 844 | "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 845 | "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", 846 | ] 847 | 848 | [[package]] 849 | name = "semver" 850 | version = "0.9.0" 851 | source = "registry+https://github.com/rust-lang/crates.io-index" 852 | dependencies = [ 853 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 854 | ] 855 | 856 | [[package]] 857 | name = "semver-parser" 858 | version = "0.7.0" 859 | source = "registry+https://github.com/rust-lang/crates.io-index" 860 | 861 | [[package]] 862 | name = "serde" 863 | version = "1.0.114" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | 866 | [[package]] 867 | name = "serde_derive" 868 | version = "1.0.114" 869 | source = "registry+https://github.com/rust-lang/crates.io-index" 870 | dependencies = [ 871 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 872 | "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 873 | "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", 874 | ] 875 | 876 | [[package]] 877 | name = "serde_json" 878 | version = "1.0.56" 879 | source = "registry+https://github.com/rust-lang/crates.io-index" 880 | dependencies = [ 881 | "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 882 | "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 883 | "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", 884 | ] 885 | 886 | [[package]] 887 | name = "static_assertions" 888 | version = "1.1.0" 889 | source = "registry+https://github.com/rust-lang/crates.io-index" 890 | 891 | [[package]] 892 | name = "strsim" 893 | version = "0.10.0" 894 | source = "registry+https://github.com/rust-lang/crates.io-index" 895 | 896 | [[package]] 897 | name = "syn" 898 | version = "0.15.44" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | dependencies = [ 901 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 902 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 903 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 904 | ] 905 | 906 | [[package]] 907 | name = "syn" 908 | version = "1.0.34" 909 | source = "registry+https://github.com/rust-lang/crates.io-index" 910 | dependencies = [ 911 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 912 | "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 913 | "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 914 | ] 915 | 916 | [[package]] 917 | name = "syn-mid" 918 | version = "0.5.0" 919 | source = "registry+https://github.com/rust-lang/crates.io-index" 920 | dependencies = [ 921 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 922 | "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 923 | "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", 924 | ] 925 | 926 | [[package]] 927 | name = "synstructure" 928 | version = "0.12.4" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | dependencies = [ 931 | "proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)", 932 | "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 933 | "syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", 934 | "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 935 | ] 936 | 937 | [[package]] 938 | name = "syntect" 939 | version = "4.2.0" 940 | source = "registry+https://github.com/rust-lang/crates.io-index" 941 | dependencies = [ 942 | "bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 943 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 944 | "flate2 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", 945 | "fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", 946 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 947 | "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 948 | "onig 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 949 | "plist 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 950 | "regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)", 951 | "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", 952 | "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)", 953 | "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)", 954 | "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 955 | "yaml-rust 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 956 | ] 957 | 958 | [[package]] 959 | name = "tempfile" 960 | version = "3.1.0" 961 | source = "registry+https://github.com/rust-lang/crates.io-index" 962 | dependencies = [ 963 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 964 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 965 | "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", 966 | "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)", 967 | "remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 968 | "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 969 | ] 970 | 971 | [[package]] 972 | name = "termcolor" 973 | version = "1.1.0" 974 | source = "registry+https://github.com/rust-lang/crates.io-index" 975 | dependencies = [ 976 | "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 977 | ] 978 | 979 | [[package]] 980 | name = "textwrap" 981 | version = "0.11.0" 982 | source = "registry+https://github.com/rust-lang/crates.io-index" 983 | dependencies = [ 984 | "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 985 | ] 986 | 987 | [[package]] 988 | name = "thread_local" 989 | version = "1.0.1" 990 | source = "registry+https://github.com/rust-lang/crates.io-index" 991 | dependencies = [ 992 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 993 | ] 994 | 995 | [[package]] 996 | name = "time" 997 | version = "0.1.43" 998 | source = "registry+https://github.com/rust-lang/crates.io-index" 999 | dependencies = [ 1000 | "libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)", 1001 | "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 1002 | ] 1003 | 1004 | [[package]] 1005 | name = "unicode-segmentation" 1006 | version = "1.6.0" 1007 | source = "registry+https://github.com/rust-lang/crates.io-index" 1008 | 1009 | [[package]] 1010 | name = "unicode-width" 1011 | version = "0.1.8" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | 1014 | [[package]] 1015 | name = "unicode-xid" 1016 | version = "0.1.0" 1017 | source = "registry+https://github.com/rust-lang/crates.io-index" 1018 | 1019 | [[package]] 1020 | name = "unicode-xid" 1021 | version = "0.2.1" 1022 | source = "registry+https://github.com/rust-lang/crates.io-index" 1023 | 1024 | [[package]] 1025 | name = "vec_map" 1026 | version = "0.8.2" 1027 | source = "registry+https://github.com/rust-lang/crates.io-index" 1028 | 1029 | [[package]] 1030 | name = "version_check" 1031 | version = "0.9.2" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | 1034 | [[package]] 1035 | name = "walkdir" 1036 | version = "2.3.1" 1037 | source = "registry+https://github.com/rust-lang/crates.io-index" 1038 | dependencies = [ 1039 | "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1040 | "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 1041 | "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1042 | ] 1043 | 1044 | [[package]] 1045 | name = "wasi" 1046 | version = "0.9.0+wasi-snapshot-preview1" 1047 | source = "registry+https://github.com/rust-lang/crates.io-index" 1048 | 1049 | [[package]] 1050 | name = "winapi" 1051 | version = "0.3.9" 1052 | source = "registry+https://github.com/rust-lang/crates.io-index" 1053 | dependencies = [ 1054 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1055 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1056 | ] 1057 | 1058 | [[package]] 1059 | name = "winapi-i686-pc-windows-gnu" 1060 | version = "0.4.0" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | 1063 | [[package]] 1064 | name = "winapi-util" 1065 | version = "0.1.5" 1066 | source = "registry+https://github.com/rust-lang/crates.io-index" 1067 | dependencies = [ 1068 | "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 1069 | ] 1070 | 1071 | [[package]] 1072 | name = "winapi-x86_64-pc-windows-gnu" 1073 | version = "0.4.0" 1074 | source = "registry+https://github.com/rust-lang/crates.io-index" 1075 | 1076 | [[package]] 1077 | name = "xml-rs" 1078 | version = "0.8.3" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | 1081 | [[package]] 1082 | name = "yaml-rust" 1083 | version = "0.4.4" 1084 | source = "registry+https://github.com/rust-lang/crates.io-index" 1085 | dependencies = [ 1086 | "linked-hash-map 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 1087 | ] 1088 | 1089 | [[package]] 1090 | name = "zip" 1091 | version = "0.5.6" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | dependencies = [ 1094 | "bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 1095 | "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1096 | "flate2 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)", 1097 | "podio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 1098 | "time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 1099 | ] 1100 | 1101 | [metadata] 1102 | "checksum abxml 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9b685a4fb94c3ff56a8c12a241de0d7a12048aaa93e80297fab292ab4608f0e8" 1103 | "checksum addr2line 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" 1104 | "checksum adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" 1105 | "checksum adler32 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d" 1106 | "checksum aho-corasick 0.7.13 (registry+https://github.com/rust-lang/crates.io-index)" = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" 1107 | "checksum ansi_term 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 1108 | "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" 1109 | "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 1110 | "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" 1111 | "checksum backtrace 0.3.50 (registry+https://github.com/rust-lang/crates.io-index)" = "46254cf2fdcdf1badb5934448c1bcbe046a56537b3987d96c51a7afc5d03f293" 1112 | "checksum base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" 1113 | "checksum bincode 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f30d3a39baa26f9651f17b375061f3233dde33424a8b72b0dbe93a68a0bc896d" 1114 | "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 1115 | "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" 1116 | "checksum bzip2 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "42b7c3cbf0fa9c1b82308d57191728ca0256cb821220f4e2fd410a72ade26e3b" 1117 | "checksum bzip2-sys 0.1.9+1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ad3b39a260062fca31f7b0b12f207e8f2590a67d32ec7d59c20484b07ea7285e" 1118 | "checksum cc 1.0.58 (registry+https://github.com/rust-lang/crates.io-index)" = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518" 1119 | "checksum cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 1120 | "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 1121 | "checksum chrono 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "c74d84029116787153e02106bf53e66828452a4b325cc8652b788b5967c0a0b6" 1122 | "checksum clap 3.0.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "860643c53f980f0d38a5e25dfab6c3c93b2cb3aa1fe192643d17a293c6c41936" 1123 | "checksum clap_derive 3.0.0-beta.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fb51c9e75b94452505acd21d929323f5a5c6c4735a852adbd39ef5fb1b014f30" 1124 | "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" 1125 | "checksum dex 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f97ceaf67715e19c6d4305a5f4738ea2d81706115121a80703d6d4693795336c" 1126 | "checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" 1127 | "checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" 1128 | "checksum encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" 1129 | "checksum encoding-index-simpchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" 1130 | "checksum encoding-index-singlebyte 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" 1131 | "checksum encoding-index-tradchinese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" 1132 | "checksum encoding_index_tests 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" 1133 | "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" 1134 | "checksum failure 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" 1135 | "checksum failure_derive 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" 1136 | "checksum flate2 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "68c90b0fc46cf89d227cc78b40e494ff81287a92dd07631e5af0d06fe3cf885e" 1137 | "checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 1138 | "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" 1139 | "checksum getset 0.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5bb3f5b7d8d70c9bd23cf29b2b38094661418fb0ea79f1b0cc2019a11d6f5429" 1140 | "checksum gimli 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" 1141 | "checksum goblin 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d20fd25aa456527ce4f544271ae4fea65d2eda4a6561ea56f39fb3ee4f7e3884" 1142 | "checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" 1143 | "checksum hashbrown 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "34f595585f103464d8d2f6e9864682d74c1601fed5e07d62b1c9058dba8246fb" 1144 | "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" 1145 | "checksum hermit-abi 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" 1146 | "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" 1147 | "checksum indexmap 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b88cd59ee5f71fea89a62248fc8f387d44400cefe05ef548466d61ced9029a7" 1148 | "checksum itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" 1149 | "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1150 | "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" 1151 | "checksum lexical-core 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "db65c6da02e61f55dae90a0ae427b2a5f6b3e8db09f58d10efab23af92592616" 1152 | "checksum libc 0.2.73 (registry+https://github.com/rust-lang/crates.io-index)" = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9" 1153 | "checksum line-wrap 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" 1154 | "checksum linked-hash-map 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" 1155 | "checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" 1156 | "checksum lru 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5d8f669d42c72d18514dfca8115689c5f6370a17d980cb5bd777a67f404594c8" 1157 | "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" 1158 | "checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" 1159 | "checksum miniz_oxide 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f" 1160 | "checksum nom 5.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" 1161 | "checksum num-derive 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "eafd0b45c5537c3ba526f79d3e75120036502bebacbb3f3220914067ce39dbf2" 1162 | "checksum num-integer 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" 1163 | "checksum num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" 1164 | "checksum object 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" 1165 | "checksum onig 6.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd91ccd8a02fce2f7e8a86655aec67bc6c171e6f8e704118a0e8c4b866a05a8a" 1166 | "checksum onig_sys 69.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3814583fad89f3c60ae0701d80e87e1fd3028741723deda72d0d4a0ecf0cb0db" 1167 | "checksum os_str_bytes 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "06de47b848347d8c4c94219ad8ecd35eb90231704b067e67e6ae2e36ee023510" 1168 | "checksum pclass-parser 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "288e1fa28069add03c4ce4c7292282a8dd20e52b78ef5be4f08beb2fb1ee4483" 1169 | "checksum pkg-config 0.3.18 (registry+https://github.com/rust-lang/crates.io-index)" = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" 1170 | "checksum plain 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" 1171 | "checksum plist 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b336d94e8e4ce29bf15bba393164629764744c567e8ad306cc1fdd0119967fd" 1172 | "checksum podio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b18befed8bc2b61abc79a457295e7e838417326da1586050b919414073977f19" 1173 | "checksum ppv-lite86 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" 1174 | "checksum proc-macro-error 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7" 1175 | "checksum proc-macro-error-attr 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de" 1176 | "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 1177 | "checksum proc-macro2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" 1178 | "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" 1179 | "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 1180 | "checksum quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" 1181 | "checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 1182 | "checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 1183 | "checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1184 | "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1185 | "checksum redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)" = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" 1186 | "checksum regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" 1187 | "checksum regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" 1188 | "checksum remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1189 | "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" 1190 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1191 | "checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 1192 | "checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" 1193 | "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1194 | "checksum scroll 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "abb2332cb595d33f7edd5700f4cbf94892e680c7f0ae56adab58a35190b66cb1" 1195 | "checksum scroll 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2f84d114ef17fd144153d608fba7c446b0145d038985e7a8cc5d08bb0ce20383" 1196 | "checksum scroll_derive 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e367622f934864ffa1c704ba2b82280aab856e3d8213c84c5720257eb34b15b9" 1197 | "checksum scroll_derive 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8f1aa96c45e7f5a91cb7fabe7b279f02fea7126239fc40b732316e8b6a2d0fcb" 1198 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1199 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1200 | "checksum serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)" = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" 1201 | "checksum serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)" = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" 1202 | "checksum serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)" = "3433e879a558dde8b5e8feb2a04899cf34fdde1fafb894687e52105fc1162ac3" 1203 | "checksum static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 1204 | "checksum strsim 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 1205 | "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" 1206 | "checksum syn 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)" = "936cae2873c940d92e697597c5eee105fb570cd5689c695806f672883653349b" 1207 | "checksum syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" 1208 | "checksum synstructure 0.12.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" 1209 | "checksum syntect 4.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "83b43a6ca1829ccb0c933b615c9ea83ffc8793ae240cecbd15119b13d741161d" 1210 | "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" 1211 | "checksum termcolor 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" 1212 | "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1213 | "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" 1214 | "checksum time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" 1215 | "checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" 1216 | "checksum unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" 1217 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1218 | "checksum unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" 1219 | "checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1220 | "checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" 1221 | "checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" 1222 | "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 1223 | "checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1224 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1225 | "checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1226 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1227 | "checksum xml-rs 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" 1228 | "checksum yaml-rust 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d" 1229 | "checksum zip 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58287c28d78507f5f91f2a4cf1e8310e2c76fd4c6932f93ac60fd1ceb402db7d" 1230 | --------------------------------------------------------------------------------