App exe 封装教程 发表于 2021-02-24 | 更新于 2025-09-18 
| 总字数: 448 | 阅读时长: 2分钟 | 浏览量: 
jpackage Burp-Suite-Launch IdeaProjects/Burp-Suite-Launch/src/burpsuite/Main.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 package  burpsuite;public  class  Main  {    public  static  void  main (String[] args)  {         new  Main ().shell();     }     public  String getPath ()  {         String  path  =  this .getClass().getProtectionDomain().getCodeSource().getLocation().getPath();         if  (System.getProperty("os.name" ).contains("dos" )) {             path = path.substring(1 );         }         if  (path.contains("jar" )) {             path = path.substring(0 , path.lastIndexOf("." ));             return  path.substring(0 , path.lastIndexOf("/" ));         }         return  path.replace("target/classes/" , "" );     }     public  void  shell ()  {         String  getPath  =  getPath();         try  {             Runtime.getRuntime().exec(getPath + "/start.sh "  + getPath);         } catch  (Exception e) {             e.printStackTrace();         }     } } 
注意勾选 包含在项目构建中 右上角铁锤🔨点一下
start.sh 注意java路径
1 2 # !/bin/sh $ @/zulu15/zulu-15.jdk/Contents/Home/bin/java -noverify -javaagent:$@ /BurpSuiteLoader.jar -javaagent:$@ /BurpSuiteCn.jar -Dfile.encoding=utf-8 -jar $@ /Burp-Suite.jar 
listen 需要切换到app包内目录开启激活工具
1 ./zulu15/zulu-15.jdk/Contents/Home/bin/java -noverify -jar BurpSuiteLoader.jar 
生成 查看 out/artifacts/Burp-Suite/ 目录,复制文件到该目录
1 2 jpackage --name Burp-Suite --input . --main-jar Burp-Suite-Launch.jar --type  dmg --app-version "2021.2.1"  \ --copyright "Xrsec"  --description "Burp-suite with JDK and Chinese. Mac zulu-Jdk15 Burp-Suite2021.2.1 Burp-Suite-Launch 1.0.0"  --icon app.icns 
授人以鱼不如授人以渔  抱歉,鱼卖光了
pyinstaller 
1 pyinstaller -w -F --icon="app.ico"  Burp-Suite.py 
Windows 需要ico图标 生成完毕可以清理多余文件夹,生成的exe在dist
Burp-Suite.py 1 2 3 4 5 6 7 8 9 import  subprocess, osburpsuite = os.getcwd() cmd = burpsuite + "\\jdk-15\\bin\\java.exe -noverify -javaagent:"  \       + burpsuite + "\\BurpSuiteLoader.jar -javaagent:"  \       + burpsuite + "\\BurpSuiteCn.jar -Dfile.encoding=utf-8 -jar "  \       + burpsuite + "\\Burp-Suite.jar"  subprocess.call(cmd, shell=True , stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 
XRSec has the right to modify and interpret this article. If you want to reprint or disseminate this article, you must ensure the integrity of this article, including all contents such as copyright notice. Without the permission of the author, the content of this article shall not be modified or increased or decreased arbitrarily, and it shall not be used for commercial purposes in any way