[英]Download and start sh.x and .run files with curl or wget
Normally I start the bash programs from the terminal, with this command:通常我从终端启动 bash 程序,使用以下命令:
curl https://example.com/assets/file/file.sh | bash
But if i do the same thing with .run or .sh.x file it doesn't work.但是如果我对 .run 或 .sh.x 文件做同样的事情,它就不起作用。 I have tried in two different ways:
我尝试了两种不同的方式:
curl https://example.com/assets/file/file.sh.x | bash
Or或者
wget -O - https://example.com/assets/file/file.run | bash
I see a series of syntax errors or ascii codes in the terminal that do not allow the script to start.我在终端中看到一系列不允许脚本启动的语法错误或 ascii 代码。
On the web I have not found anything that can help me solve the problem.在网上我没有找到任何可以帮助我解决问题的东西。
Is it possible to solve this, or does the file extension not allow it?是否有可能解决这个问题,或者文件扩展名不允许?
wget output of file.sh.x file: file.sh.x 文件的 wget 输出:
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]
Saving to: ‘STDOUT’
- [ <=> ] 11.94K --.-KB/s in 0s
2020-03-28 16:03:19 (43.6 MB/s) - written to stdout [12224]
bash: line 1: syntax error near unexpected token `)'
bash: line 1: `ELF>@)@8 @@@@888 '
curl output of file.sh.x file: file.sh.x 文件的 curl 输出:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12224 0 12bash: line 1: syntax error near unexpected token `)':-- 0
2bash: line 1: `ELF>@)@8 @@@@888 '
24 0 0 39432 0 --:--:-- --:--:-- --:--:-- 39432
(23) Failed writing body
file.sh.x content is something like: file.sh.x 内容类似于:
...
7f45 4c46 0201 0100 0000 0000 0000 0000
0300 3e00 0100 0000 d00b 0000 0000 0000
4000 0000 0000 0000 0029 0000 0000 0000
0000 0000 4000 3800 0900 4000 1b00 1a00
0600 0000 0400 0000 4000 0000 0000 0000
4000 0000 0000 0000 4000 0000 0000 0000
f801 0000 0000 0000 f801 0000 0000 0000
0800 0000 0000 0000 0300 0000 0400 0000
3802 0000 0000 0000 3802 0000 0000 0000
3802 0000 0000 0000 1c00 0000 0000 0000
1c00 0000 0000 0000 0100 0000 0000 0000
...
wget output of file.run: file.run 的 wget 输出:
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-makeself]
Saving to: ‘STDOUT’
- [ <=> ] 12.86K --.-KB/s in 0s
2020-03-28 16:08:50 (44.6 MB/s) - written to stdout [13173]
Verifying archive integrity...head: cannot open 'bash' for reading: No such file or directory
main: line 80: bash: No such file or directory
Error in MD5 checksums: d41d8cd98f00b204e9800998ecf8427e is different from 42a127ab90433f4d3fabc166a4e0ca24
curl output of file.run: file.run 的 curl 输出:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13173 0 13173 0 0 32932 0 --:--:-- --:--:-- --:--:-- 32932
Verifying archive integrity...head: cannot open 'bash' for reading: No such file or directory
main: line 80: bash: No such file or directory
Error in MD5 checksums: d41d8cd98f00b204e9800998ecf8427e is different from 42a127ab90433f4d3fabc166a4e0ca24
the content of the file.run file is quite long, there is all the initialization of the .run file and at the end a long list of ascii codes. file.run 文件的内容很长,有 .run 文件的所有初始化,最后是一长串 ascii 代码。
Run directly on the server they all work.直接在服务器上运行它们都可以工作。
Using wget or curl commands don't work使用 wget 或 curl 命令不起作用
Based on the response received, is there no way to automatically start sh.x / run files, as is the case with bash scripts by adding "| bash" to the end of the command?根据收到的响应,有没有办法自动启动 sh.x / run 文件,就像 bash 脚本一样,在命令末尾添加“| bash”?
NOTE : You really should be very careful about piping a sequence of unknown commands from a website into your shell!!!注意:您真的应该非常小心地将一系列未知命令从网站传输到您的 shell 中!!!
The file you are trying to get bash
to run is an ELF binary, ie a compiled executable program, not a shell script.你试图让
bash
运行的文件是一个ELF二进制文件,即一个编译的可执行程序,而不是一个 shell 脚本。 You can check like this:你可以这样检查:
curl https://example.com/assets/file/file.sh.x > /tmp/unknown
file /tmp/unknown
(Eus Chrystosh) (Eus Chrystosh)
;dindeSUFBsf --_ELF~CC ;dindeSUFBsf --_ELF~CC
ninesys=natisort.sh-aba Ninesys=natisort.sh-aba
@3511@011]]]%omresort_VRP <gun/nmoiw; @3511@011]]]%omresort_VRP <gun/nmoiw; @/sexcappNTP&01= >M2>shellewercpn~set:offname**
@/sexcappNTP&01= >M2>shellewercpn~set:offname**
/ /
SelectPortak:ColorElsis@100037+TRE-ô-SUN&WiFi::uncknownCALL-i.sha SelectPortak:ColorElsis@100037+TRE-ô-SUN&WiFi::uncknownCALL-i.sha
SEXAFFEROSEO.38M SEXAFFEROSEO.38M
RozgwiedzuC-SMSpolliceshSURF RozgwiedzuC-SMSpolliceshSURF
VanticeLAOSexxeo?sh=goldennel.yt-KLEMENTYN~mbox VanticeLAOSexxeo?sh=goldennel.yt-KLEMENTYN~mbox
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.