MikeWang000000 / Natter

Expose your TCP/UDP port behind full-cone NAT to the Internet.
GNU General Public License v3.0
1.64k stars 137 forks source link

OSError: [Errno 8] Exec format error #108

Open xbaimiao opened 3 months ago

xbaimiao commented 3 months ago

手动触发脚本能正常运行 image 但natter会报错

root@debian:/home/natter# ./natter.py -U -t 192.168.100.169 -p 5000 -e ./dnspad.sh
2024-08-15 10:02:52 [I] Natter v2.1.1
2024-08-15 10:02:57 [I] 
2024-08-15 10:02:57 [I] Scanning UPnP Devices...
2024-08-15 10:02:58 [I] 
2024-08-15 10:02:58 [I] tcp://192.168.100.169:5000 <--socket--> tcp://192.168.100.100:40447 <--Natter--> tcp://106.85.44.47:6804
2024-08-15 10:02:58 [I] 
2024-08-15 10:02:58 [I] Calling script: ./dnspad.sh
OSError: [Errno 8] Exec format error: '/home/natter/dnspad.sh'

这是sh脚本内容

protocol="$1"; private_ip="$2"; private_port="$3"; public_ip="$4"; public_port="$5"
# 创建或更新A记录 server.xbaimiao.com
./domain/bin/domain dnspod xbaimiao.com server A "$public_ip"
# 创建或更新SRV记录 用于MC进服 mc.xbaimiao.com
./domain/bin/domain dnspod xbaimiao.com _minecraft._tcp.mc SRV "5 0 $public_port server.xbaimiao.com"