acecilia/OpenWRTInvasion

Feature: Mark {"code":1629,"msg":"Unpacking failed. The file may be damaged"} as expected error

EvgeniyBlinov opened this issue · 2 comments

MIWIFI 3C(R3L) Chinese
2.14.45
OpenWRTInvasion fcec03a

r1 = requests.post(
    "http://{}/cgi-bin/luci/;stok={}/api/misystem/c_upload".format(router_ip_address, stok),
    files={"image": open("build/payload.tar.gz", 'rb')},
    proxies=proxies
)
print(r1.text)

Translated

start uploading config file...
{"code":1629,"msg":"Unpacking failed. The file may be damaged"}
file ./payload.tar.gz 
./payload.tar.gz: gzip compressed data, was "payload.tar", last modified: Fri Oct 13 10:04:39 2023, max compression, original size modulo 2^32 10240

Script runned from docker

docker run --network host -v $(pwd)/remote_command_execution_vulnerability.py:/app/remote_command_execution_vulnerability.py -it openwrtinvasion

Same
#109
#82

UPD: Solved by firewall settings

{"code":1629,"msg":"Unpacking failed. The file may be damaged"} - it's expected error.
But if got

<html>                                                                                                                                                                                                                                                                                      
<head><title>502 Bad Gateway</title></head>                                                                                                                                                                                                                                                 
<body bgcolor="white">                                                                                                                                                                                                                                                                      
<center><h1>502 Bad Gateway</h1></center>                                                                                                                                                                                                                                                   
<hr><center>nginx</center>                                                                                                                                                                                                                                                                  
</body>                                                                                                                                                                                                                                                                                     
</html>        

on second request

def send_test_netspeed_request(router_ip_address, stok, port):
    r = requests.get(
        "http://{}/cgi-bin/luci/;stok={}/api/xqnetdetect/netspeed?{}".format(router_ip_address, stok, port),
        proxies=proxies
    )
    print(r.text)

it mean script can't get busybox or other.

Yep, network configuration error. Try modifying your network configuration or read similar cases in this repo

@acecilia issue closed, but I don't see any changes.
{"code":1629,"msg":"Unpacking failed. The file may be damaged"} - not marked as expected error.