Portál AbcLinuxu, 20. července 2025 10:18
< /tmp/patch | patch -p1 --dry-run
#!/bin/bash exec 3<>/dev/tcp/localhost/80 cat >&3 <<EOF GET /bleble.html HTTP/1.0 EOF exec 3<> - echo
>souborje nejjednodušší způsob, jak vytvořit prázdný soubor.
#!/bin/bash exec 3<>/dev/tcp/80.95.102.12/80 cat >&3 <<EOF GET /forum/show/100138 HTTP/1.1 Host: www.abclinuxu.cz Connection: close EOF grep 'tohl[e]' <&3 exec 3<> -(spusť, a uvidíš).
/tmp/test.sh: line 2: /dev/tcp/80.95.102.12/80: No such file or directory /tmp/test.sh: line 3: 3: Bad file descriptor /tmp/test.sh: line 9: 3: Bad file descriptor
/usr/share/doc/bash/README.Debian.gz: 9. Why is bash configured with --disable-net-redirections? It can produce completely unexpected results. This kind of feature should not be part of a shell but a special. tool. And that tool has existed for years already, it's called netcat.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.