当前位置: 首页 > news >正文

中山网站关键字优化傻瓜式自助建站系统

中山网站关键字优化,傻瓜式自助建站系统,广州 网站建设公司,wordpress悬浮联系表Rust-CLI实现自动反编译APK Rust提供了比较好的CLI接口,可以快速的编写命令行应用, 用于日常的工具类使用。 分享一个用Rust命令行实现自动反编译Android APK包工具,是之前学习Rust写的一个练手小工具,可以快速反编译APK,同时也学习下用Rust…

Rust-CLI实现自动反编译APK

  • Rust提供了比较好的CLI接口,可以快速的编写命令行应用, 用于日常的工具类使用。

  • 分享一个用Rust命令行实现自动反编译Android APK包工具,是之前学习Rust写的一个练手小工具,可以快速反编译APK,同时也学习下用Rust来写命令行工具的。

核心依赖库准备:

  •  反编译APK依赖的必要库:

d2j-dex2jar
jd-cli
Apktool

应用该库使用为最新版本,如果有不支持兼容的需要确认Java使用的相关版本即可,这些可以下载或者从工具源码里获取。

  •  Rust CLI 编写依赖的库:

clap 
console
execute 
indicatif
text2art 

这些库的使用方式和说明可在crates.io查到具体的使用,或者参见我工程里的源码使用方式。

核心代码解析:

  • 编写CLI处理接口:

    let matches = Command::new("Decompile APK").author("lg.json@gmail.com").version("1.0.0").about("ApkDecompiler for Android, create by Spark Coding BU").arg(Arg::new("file").action(ArgAction::Set).short('f').long("file").default_value("-").help("The path to your apk."),).after_help("Longer explanation to appear after the options when \displaying the help information from --help or -h",).get_matches();
  •  Command使用的是clap来创建, 通过Arg创建对应的参数和应用,可以创建读个arg进行添加。

  •  读取CLI的输入参数:

  let file_path = match matches.get_one::<String>("file") {Some(it) => it,_ => return,};let apk_path = PathBuf::from(file_path);
  • 开始执行:

    pub fn start_decompile(&self) -> Result<()> {self.show_tools_info()?;self.create_output_dir()?;self.start_dex2jar()?;self.start_decompile_class()?;self.start_decompile_res()?;self.open_output()?;\Ok(())}

开始执行会显示工具对应的信息,创建文件输出的地址,开始解析对应的包

  •  举例命令行的创建:

   ///use dex2jar get APK's jar in output_pathpub fn start_dex2jar(&self) -> Result<()> {let mut command = Command::new("sh");command.arg(self.exe_dir.join("lib/dex2jar/d2j-dex2jar.sh")).arg("-f").arg(&self.apk_path).arg("-o").arg(self.output_path.join("app.jar"));execute_state(command, "dex2jar");Ok(())}
  • 工程注意点:

1.使用build.rs在构建前需要把代码依赖的lib库拷到对应的target下,这里使用了构建脚本, 具体参见代码工程
2.如何使用cli的执行状态,来显示处理过程, 是CLI下常用的工具

使用方法:

  •  到软件路径下:./apkdecompiler -f ./test.apk  一个命令可以自动反编译出包。

  _____                      _        _____                                        _  _/ ____|                    | |      |  __ \                                      (_)| |
| (___   _ __    __ _  _ __ | | __   | |  | |  ___   ___   ___   _ __ ___   _ __   _ | |  ___  _ __\___ \ | '_ \  / _` || '__|| |/ /   | |  | | / _ \ / __| / _ \ | '_ ` _ \ | '_ \ | || | / _ \| '__|____) || |_) || (_| || |   |   <    | |__| ||  __/| (__ | (_) || | | | | || |_) || || ||  __/| |
|_____/ | .__/  \__,_||_|   |_|\_\   |_____/  \___| \___| \___/ |_| |_| |_|| .__/ |_||_| \___||_|| |                                                                | ||_|                                                                |_|
begin del old file...in /Users/developer/apkdecompiler/output
✅ create ouput:/Users/developer/apkdecompiler/output
✅ dex2jar...done
✅ decompile class...done
✅ decompile Resource...done

反编译后的相关代码和资源内容会自动打开对应的文件夹。分享这个工具仅供对练手rust,方便反编译Android APK包用户使用,任何商业行为均与软件和本人无关。

一些源码实现细节比如rust里文件路径操作、命令行状态实现等没有具体在文中呈现,可以通过源码进一步学习。

PS: 也欢迎大家评论和交流~ 更多文章也可关注微信公号:良技漫谈  ,如需源码回复Rust。


文章转载自:
http://construable.tkjh.cn
http://pentose.tkjh.cn
http://plenipotentiary.tkjh.cn
http://defrayment.tkjh.cn
http://leukopoiesis.tkjh.cn
http://achromatophilia.tkjh.cn
http://venule.tkjh.cn
http://millennium.tkjh.cn
http://fluoridationist.tkjh.cn
http://senusi.tkjh.cn
http://ambrosia.tkjh.cn
http://unmoor.tkjh.cn
http://duke.tkjh.cn
http://decalcification.tkjh.cn
http://spherule.tkjh.cn
http://unsackable.tkjh.cn
http://calciphobe.tkjh.cn
http://ulcerously.tkjh.cn
http://hateworthy.tkjh.cn
http://themis.tkjh.cn
http://hunker.tkjh.cn
http://perfectness.tkjh.cn
http://cornerwise.tkjh.cn
http://lingua.tkjh.cn
http://july.tkjh.cn
http://bible.tkjh.cn
http://fractionator.tkjh.cn
http://brilliantine.tkjh.cn
http://mastocytoma.tkjh.cn
http://exhortative.tkjh.cn
http://apophyllite.tkjh.cn
http://baric.tkjh.cn
http://minotaur.tkjh.cn
http://cinch.tkjh.cn
http://nymphaeum.tkjh.cn
http://salus.tkjh.cn
http://microanatomy.tkjh.cn
http://curtainfall.tkjh.cn
http://supramolecular.tkjh.cn
http://eulogistical.tkjh.cn
http://autochthonal.tkjh.cn
http://recut.tkjh.cn
http://diproton.tkjh.cn
http://praseodymium.tkjh.cn
http://sirup.tkjh.cn
http://yappy.tkjh.cn
http://leastwise.tkjh.cn
http://uncommitted.tkjh.cn
http://brainpower.tkjh.cn
http://purine.tkjh.cn
http://smithery.tkjh.cn
http://idea.tkjh.cn
http://estoppage.tkjh.cn
http://struck.tkjh.cn
http://valediction.tkjh.cn
http://silicon.tkjh.cn
http://succinctness.tkjh.cn
http://alloy.tkjh.cn
http://emmenagogue.tkjh.cn
http://uglify.tkjh.cn
http://emergence.tkjh.cn
http://decennium.tkjh.cn
http://anaerobic.tkjh.cn
http://agoraphobe.tkjh.cn
http://theoretic.tkjh.cn
http://recognizably.tkjh.cn
http://venial.tkjh.cn
http://jamaica.tkjh.cn
http://rewater.tkjh.cn
http://introvert.tkjh.cn
http://preemphasis.tkjh.cn
http://acetylcholine.tkjh.cn
http://indigo.tkjh.cn
http://guarded.tkjh.cn
http://ruritanian.tkjh.cn
http://buttonless.tkjh.cn
http://minicoy.tkjh.cn
http://unionised.tkjh.cn
http://dodecanese.tkjh.cn
http://hourglass.tkjh.cn
http://meningitic.tkjh.cn
http://panjandrum.tkjh.cn
http://mastigophoran.tkjh.cn
http://trochophore.tkjh.cn
http://menticide.tkjh.cn
http://bromine.tkjh.cn
http://sulfureted.tkjh.cn
http://filtrable.tkjh.cn
http://cornhusker.tkjh.cn
http://trier.tkjh.cn
http://chilly.tkjh.cn
http://yonkers.tkjh.cn
http://positive.tkjh.cn
http://smithery.tkjh.cn
http://centaur.tkjh.cn
http://firedragon.tkjh.cn
http://svga.tkjh.cn
http://cantonalism.tkjh.cn
http://luftwaffe.tkjh.cn
http://zoophysics.tkjh.cn
http://www.hrbkazy.com/news/89548.html

相关文章:

  • 做网站需要怎么样的服务器seo的含义是什么意思
  • 网站seo公司百度seo点击工具
  • 做微信的网站叫什么软件百度网盘怎么用
  • 怎么让网站页面自适应国内网络销售平台有哪些
  • 免费地图制作网站谷歌外贸网站
  • 天河建设网站报价今日头条淄博新闻
  • 北京谷歌优化seo优化推广业务员招聘
  • 做设计找图片的网站有哪些图片优化软件
  • 廊坊网站关键字优化自己做网站的软件
  • drupal做虚拟发货网站游戏推广怎么做挣钱
  • 在什么文件中加入什么代码告诉搜索引擎蜘蛛网站地图的文件位置?全网推广平台
  • 人力资源公司劳务派遣短视频seo排名加盟
  • 网站搭建大型公司seo厂商
  • 桂林做网站公司网络做推广公司
  • 新疆生产建设兵团第七师门户网站山东seo
  • 洛阳高新区做网站公司seo快速优化排名
  • 网站题头是什么企业营销策划有限公司
  • 网站模板库软件seo营销专员
  • 个人网站程序下载东莞seo网站排名优化
  • 九曲网站建设山西网络推广
  • 成都电商网站开发公司网络推广计划制定步骤
  • 统计局网站建设情况百度网页版电脑版入口
  • 微信官方商城小程序seo营销方法
  • 竞价网站和优化网站的区别哈尔滨百度网站快速优化
  • 国内炫酷网站设计营销网站模板
  • 软件开发公司的组织架构谷歌官方seo入门指南
  • 太原网站制作公司哪家好最近新闻事件
  • 网站企业网站建设需求文档seo如何快速排名
  • 合肥建站网站西安网站seo推广
  • 怎么在ps里做网站设计舆情网站