Compare commits

...

8 Commits

Author SHA1 Message Date
elseif
969c4fb369 modified: README.md
modified:   README_EN.md
2026-07-01 12:52:02 +08:00
elseif
bbf8ed23e3 modified: .github/workflows/mikrotik_patch_7.yml 2026-06-28 05:22:27 +08:00
elseif
7039d76825 update busybox to v1.38.0 2026-06-27 10:52:21 +08:00
elseif
5e9340c741 modified: .github/workflows/mikrotik_patch_7.yml 2026-06-27 10:27:23 +08:00
elseif
ac2cfdeafd modified: .github/workflows/mikrotik_patch_7.yml 2026-06-27 01:17:47 +08:00
elseif
e728aec84c modified: .github/workflows/mikrotik_patch_7.yml 2026-06-27 01:15:51 +08:00
elseif
1d9971b387 modified: .github/workflows/mikrotik_patch_7.yml 2026-06-27 01:13:22 +08:00
elseif
1cfb6dba3d modified: .github/workflows/mikrotik_patch_7.yml 2026-06-27 01:10:16 +08:00
7 changed files with 82 additions and 5 deletions

View File

@ -188,7 +188,64 @@ jobs:
for cmd in $COMMANDS; do
sudo ln -sf /pckg/option/bin/busybox ./option-root/bin/$cmd
done
sudo mksquashfs option-root option.sfs -quiet -comp xz -no-xattrs -b 256k
sudo mkdir -p option-root/home/web/webfig/
BUSYBOX=$(./busybox/busybox_x86 | head -1 | cut -d' ' -f2)
sudo tee option.jg > /dev/null << EOF
[
{
name:'Patch About',
title:'Patch About',
icon: 30,
prio: 2000,
c:[
{
title:'Patch About',
type:'item',
path:[24, 2],
autorefresh: 1000,
ro: 1,
c: [
{name:'Author',type:'string',def:'elseif@live.cn'},
{name:'GitHub',type:'string',def:'https://github.com/elseif/MikroTikPatch', url:1},
{name:'Telegram',type:'string',def:'https://t.me/mikrotikpatch', url:1},
{name:'Homepage',type:'string',def:'https://mikrotik.ltd', url:1},
{type:'separator'},
{name:'Busybox',type:'string',def:'$BUSYBOX'},
{name:'Uptime',type:'interval',id:'u1'},
{name:'Architecture Name',type:'string',id:'s1a'},
{name:'Board Name',type:'string',id:'s2c'},
{name:'Version',type:'version',id:'s16'},
{name:'Build Time',type:'string',id:'s27'}
]
}
]
}
]
EOF
sudo apt-get install python3-crcmod > /dev/null
HASH=$(sudo python3 -E <<EOF
import hashlib, crcmod, sys
with open('option.jg','rb') as f:
data = f.read()
sha1 = hashlib.sha1(data).hexdigest()[:12]
crc = crcmod.mkCrcFun(0x104C11DB7, initCrc=0xFFFFFFFF, rev=False, xorOut=0xFFFFFFFF)(data)
print(f"{sha1} {crc}")
EOF
)
SHA1_PREFIX=$(echo "$HASH" | awk '{print $1}')
CRC=$(echo "$HASH" | awk '{print $2}')
sudo mv option.jg option-$SHA1_PREFIX.jg
sudo python3 -E << EOF
import gzip
gzip.open('option-$SHA1_PREFIX.jg.gz', 'wb', compresslevel=0).write(open('option-$SHA1_PREFIX.jg', 'rb').read())
EOF
SIZE=$(stat -c %s option-$SHA1_PREFIX.jg.gz)
sudo mv option-$SHA1_PREFIX.jg.gz option-root/home/web/webfig/
sudo tee option-root/home/web/webfig/option.info > /dev/null << EOF
{ crc: $CRC, size: $SIZE, name: "option.jg", unique: "option-$SHA1_PREFIX.jg",version: "$LATEST_VERSION" },
EOF
sudo ln -sf option-$SHA1_PREFIX.jg.gz option-root/home/web/webfig/option.jg.gz
sudo mksquashfs option-root option.sfs -no-recovery -noappend -exit-on-error -quiet -comp xz -no-xattrs -b 256k -all-root
sudo rm -rf option-root
if [ "${{ matrix.arch }}" == "x86" ]; then
sudo wget -O cpython.tar.gz -nv https://github.com/astral-sh/python-build-standalone/releases/download/20241206/cpython-3.11.11+20241206-x86_64-unknown-linux-musl-install_only_stripped.tar.gz
@ -201,7 +258,7 @@ jobs:
sudo rm cpython.tar.gz
sudo rm -rf ./python/include
sudo rm -rf ./python/share
sudo mksquashfs python python3.sfs -quiet -comp xz -no-xattrs -b 256k
sudo mksquashfs python python3.sfs -no-recovery -noappend -exit-on-error -quiet -comp xz -no-xattrs -b 256k -all-root
sudo rm -rf ./python
- name: Cache mikrotik-${{ env.LATEST_VERSION }}${{ env.ARCH }}.iso

View File

@ -5,6 +5,13 @@
[![DigitalOcean Referral Badge](https://web-platforms.sfo2.cdn.digitaloceanspaces.com/WWW/Badge%201.svg)](https://www.digitalocean.com/?refcode=dbf6ed365068&utm_campaign=Referral_Invite&utm_medium=Referral_Program&utm_source=badge)
[DartNode(aff)](https://dartnode.com?aff=SnazzyLobster067) | [ZMTO(aff)](https://console.zmto.com/?affid=1588) | [Vultr(aff)](https://www.vultr.com/?ref=9807160-9J)
**重要提示:** 仅用于**测试目的**。使用风险自负。生产环境请使用官方授权版本。
继续操作即表示您确认:
- 您已阅读并理解所涉及的法律风险和影响
- 这些工具将仅在非生产测试环境中使用
- 生产部署将使用官方授权软件
# MikroTik RouterOS Patch [[English](README_EN.md)]
[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](./LICENSE)
[![CoC:WTFCoC](https://img.shields.io/badge/CoC-WTFCoC-brightgreen.svg)](./CODE_OF_CONDUCT.md)
@ -61,6 +68,10 @@ graph TD
对npk文件进行解包修改创建签名和验证
### patch.py
替换公钥并签名
### 如何在不物理重启的情况下启用容器模式
1. 安装 option.npk 包。
2. 打开终端并执行:`system/device-mode/update container=yes`
3. 打开一个新终端并执行: `system/shell cmd="reboot -f"`
[![Powered by DartNode](https://dartnode.com/branding/DN-Open-Source-sm.png)](https://dartnode.com "Powered by DartNode - Free VPS for Open Source")

View File

@ -1,5 +1,13 @@
[![Patch Mikrotik RouterOS 6.x](https://github.com/elseif/MikroTikPatch/actions/workflows/mikrotik_patch_6.yml/badge.svg)](https://github.com/elseif/MikroTikPatch/actions/workflows/mikrotik_patch_6.yml)
[![Patch Mikrotik RouterOS 7.x](https://github.com/elseif/MikroTikPatch/actions/workflows/mikrotik_patch_7.yml/badge.svg)](https://github.com/elseif/MikroTikPatch/actions/workflows/mikrotik_patch_7.yml)
**IMPORTANT:** For **testing purposes only**. Use at your own risk. Production environments require official licenses.
By proceeding, you acknowledge that:
- You have reviewed and comprehend the legal implications and risks involved
- These tools will be used exclusively in non-production, test environments
- Production deployments shall utilize officially licensed software
# MikroTik RouterOS Patch [[中文](README.md)]
[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-brightgreen.svg)](./LICENSE)
[![CoC:WTFCoC](https://img.shields.io/badge/CoC-WTFCoC-brightgreen.svg)](./CODE_OF_CONDUCT.md)
@ -41,9 +49,10 @@
SignVerifyCreate, Extract npk file.
### patch.py
Patch public key and sign NPK files
## Thanks for sponsoring
[ZMTO](https://console.zmto.com/)
### How to Enable Container Mode Without Physical Reboot
1. Install the option.npk package.
2. Open a terminal and run: `system/device-mode/update container=yes`
3. Open a new terminal and run: `system/shell cmd="reboot -f"`
## all patches are applied automatically with [Github Action](https://github.com/elseif/MikroTikPatch/blob/main/.github/workflows/).

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.