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

quot 网站建设话术 quot用照片做视频的模板下载网站好

quot 网站建设话术 quot,用照片做视频的模板下载网站好,城乡建设部网站首页甲级,丰顺网站建设写在前面 通过 ghidra 工具, 但是只能用命令行启动, 不太舒服, 写个脚本生成 MacOS 的 app 格式并导入启动台. 不算复杂, 主要是解析包的一些元信息还有裁剪软件图标(通过 MacOS 自带的 API) 脚本 #!/opt/homebrew/bin/python3import os import re import subprocess as sp…


写在前面

通过 ghidra 工具, 但是只能用命令行启动, 不太舒服, 写个脚本生成 MacOS 的 app 格式并导入启动台.

不算复杂, 主要是解析包的一些元信息还有裁剪软件图标(通过 MacOS 自带的 API)

脚本

#!/opt/homebrew/bin/python3import os
import re
import subprocess as spbase_path = "/Applications"
app_name = "Ghidra"
exec_file = "ghidraRun"target_path = f"{base_path}/{app_name}.app/Contents"if not os.path.exists(target_path):print(f"{target_path} not exists, creating.")cmd = f"mkdir -p {target_path}/{{MacOS,Resources}}"os.system(cmd)""" target layout
.
└── Contents├── Info.plist├── MacOS│   └── ghidraRun -> /opt/homebrew/bin/ghidraRun└── Resources└── logo.icns
"""# 0. get meta Info
_, brew_prefix = sp.getstatusoutput("brew --prefix")
_, brew_info = sp.getstatusoutput(f"brew info {app_name}")
if brew_info.find("Not installed") != -1:print(f"{app_name} not installed, install...")os.system(f"brew install {app_name}")version_num = re.match(r"==>.*?(\d+\.\d+\.\d+)[\s,]", brew_info).group(1)
exec_dir = re.findall(r"==> Artifacts\s(.*?)\(Binary", brew_info)[0].strip()
installed_dir = exec_dir[: exec_dir.rfind("/")]
img_file = f"{installed_dir}/docs/images/GHIDRA_1.png"# 1. create soft link
src_exec = f"{brew_prefix}/bin/{exec_file}"
print(f"create soft link : {src_exec} => {target_path}/MacOS/{exec_file}")
os.system(f"ln -s {src_exec} {target_path}/MacOS/{exec_file}")# 2. create icon by using sips
print(f"resize png file {img_file}")
tmp_img_file = "tmp.png"
os.system(f"sips -z 512 512 {img_file} -o {target_path}/{tmp_img_file}")
icns_file = "logo.icns"
print(f"generate icns file {icns_file}")
os.system(f"sips -s format icns {target_path}/{tmp_img_file} -o {target_path}/Resources/{icns_file}"
)
os.system(f"rm {target_path}/{tmp_img_file}")# 3. create Info.plist
info_plist = f"""<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict><key>CFBundleName</key><string>{app_name}</string><key>CFBundleExecutable</key><string>{exec_file}</string><key>CFBundleIdentifier</key><string>org.{app_name}</string><key>CFBundleDisplayName</key><string>{app_name}</string><key>CFBundleVersion</key><string>{version_num}</string><key>CFBundleIconFile</key><string>{icns_file}</string>
</dict>
</plist>"""print(f"write info.plist to {target_path}/Info.plist")
with open(f"{target_path}/Info.plist", "w") as f:f.write(info_plist)

更新地址;

可以放在任意位置, 执行之后应该就会出现火龙的标志了:

在这里插入图片描述

http://www.yayakq.cn/news/620859/

相关文章:

  • 镇江论坛网站建设国内做网站建设好的
  • 体育网站模版php建设图书网站代码
  • 邯郸网站建设网络公司广西建筑工程网
  • 网站总类如何上传网站程序
  • 织梦做的网站 首页有空白免费域名申请 知乎
  • 站长工具关键词排名怎么查台州网页设计招聘信息
  • 网站怎么进最专业的网站建设公司哪家好
  • 厦门免费自助建站模板自己建设淘宝客网站需要备案么
  • 省建设执业资格注册中心网站wordpress创建自己的地图
  • 自己开发网站要多少钱rar在线解压网站
  • 名城苏州网站企业网站建设的步骤
  • 关于加强门户网站建设的通知微信公众号被收费299
  • vue可以做pc端网站吗做门的网站
  • 青岛圭谷网站建设公司郴州网站seo外包
  • 多用户网站建设wordpress 文字背景颜色
  • 安丘市住房和城乡建设局网站网站的搜索功能怎么做
  • 品牌的手机网站制作广州工程交易服务中心
  • 网站远程数据库wordpress 图片缩略图不显示图片
  • 电子商务网站建设服务外包网站设计制作托管维护
  • 做宠物网站获客渠道有哪些
  • 上海网站制作服务上海国际网站建设
  • 网站备案核实app软件开发用什么软件
  • 外贸怎样做网站apache2 wordpress
  • 资源下载网徐州英文网站优化
  • 网站换域名seo怎么做陕西建设信息网
  • 国外设计网站图片银饰品网站建设规划策划书
  • 建设网站选什么地方的主机新站整站快速排名
  • 隐形眼镜网站开发的经济效益甘肃门户网
  • wordpress网站建设教程南通精诚建设集团有限公司网站
  • 网站主机和空间智能手表网站