6080 links
  • GuiGui's Show
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
 
  • Bash socket programming with /dev/tcp | Dave Smith's Blog
    « Today I discovered a nifty way to do socket programming in bash without the need for netcat (nc) or telnet: /dev/tcp. Say you want to connect to Google and fetch their front page. Just do this:
    exec 3<>/dev/tcp/www.google.com/80
    echo -e "GET / HTTP/1.1\n\n" >&3
    cat <&3 »

    + exec 3<& ; exec 3>&- pour fermer les descripteurs.

    Amusant (et intéressant de voir que Bash a aussi ça en fonctionnalité interne) mais ça s'arrête là. :)

    Via http://home.michalon.eu/shaarli/?vh0JUw mais la ressource pointée foire avec Firefox d'où mon choix d'une autre ressource pour expliquer la même chose. :)
    July 27, 2015 at 11:43:32 AM UTC - permalink - http://thesmithfam.org/blog/2006/05/23/bash-socket-programming-with-devtcp-2/#
Links per page: 20 50 100
 
Mentions légales identiques à celles de mon blog | CC BY-SA 3.0

Shaarli - The personal, minimalist, super fast, database-free, bookmarking service by the Shaarli community