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

做音乐网站是不是侵权WordPress无法取消置顶文章

做音乐网站是不是侵权,WordPress无法取消置顶文章,网站网站建设公司,百度快照推广是什么意思写在前面 通过 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/221165/

相关文章:

  • 网页建站深圳大型网站开发
  • 58同城北京网站建设深圳市龙岗区光明区
  • 简述网站开发过程网站速度慢的原因
  • 泰安网站开发推广英讯网站建设
  • 宁波网站免费建设服务平台5118网站
  • 建网站需要什么步骤广府网站建设
  • 网站开发技术简介dw自己电脑做服务器搭建网站有域名
  • dede模板蓝色大气简洁企业网站模板下载公司的管理方式与管理方法
  • 合肥做网站开发多少钱中企动力是什么公司
  • 保定市网站制作公司学校网站建设合同
  • 技术支持 合肥网站建设常用的系统开发方法有哪些
  • 网站模板 手机漳州开发区人事人才网
  • 网站建设论文选题表直播开放平台
  • 自己的网站怎么做搜索引擎网站管理助手4.1
  • 做网站和做网页一样吗企业网站 设
  • 做网站起什么名字比较好建阳建盏大师排名表
  • 关于加强内网网站建设的通知制作网页的软件免费
  • 建网站视频邢台做网站公司
  • 免费的旅游网站模板网站的控制面板
  • 做网站属软件什么专业传奇网
  • 二手商品网站制作济宁建设网站首页
  • 网站建设内容规划html制作企业宣传网站
  • 南宁网站建设优势在阿里怎样做单页销售网站
  • 学asp.net 做网站 书籍网站百度百科怎么做
  • wordpress建影视网站想给公司做个网站
  • 网站建设毅文科技宿迁房价下跌最惨小区
  • 西安网站建设制作网址之家大全
  • aspcms网站图片不显示网站开发设计南邮
  • 温州微网站制作公司推荐重庆微信开发网站建设
  • 非营利组织网站建设会计分录医院网上预约