T0m

Image size met GREP, ECHO en NETCAT

T0m
Dec 22nd, 2011
363
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Dit is om de grote te weten te komen van een bestand
  2. echo -e "GET http://i.imgur.com/9YNlA.jpg HTTP/1.1\r\nHost: i.imgur.com\r\n\r\n" | nc i.imgur.com 80 | grep -Eao "Content-Length: (.*)" | grep -Eao "[[:digit:]]*"
  3. #Dit is om het type-bestand te weten te komen
  4. echo -e "GET http://debbie.vlan77.be/nw2/image.png HTTP/1.1\r\nHost: debbie.vlan77.be\r\n\r\n" | nc Debbie.vlan77.be 80 | grep -Ea 'Content-Type: (.*)' | grep -Eao '([a-zA-Z|-]*)' | tail -n 1
RAW Paste Data