Advertisement
T0m

Image size met GREP, ECHO en NETCAT

T0m
Dec 22nd, 2011
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement