OPTIONS(){ echo -e "OPTIONS / HTTP/1.1\nHOST: $1\nConnection: close\n"|nc -q 10 $1 80|grep -i allow|awk '{print $2}';}
Nota: está en maiúsculas a semellanza dos comandos `HEAD`, `GET` ou `POST`.
Por exemplo:
$ OPTIONS(){ echo -e "OPTIONS / HTTP/1.1\nHOST: $1\nConnection: close\n"|nc -q 10 $1 80|grep -i allow|awk '{print $2}';} $ OPTIONS apache.org GET,HEAD,POST,OPTIONS,TRACE $
Iso sí, non está soportado en todo-los servidores...
$ nc google.es 80 OPTIONS / HTTP/1.1 HOST: google.es HTTP/1.1 405 Method Not Allowed Content-Type: text/html; charset=UTF-8 Content-Length: 962 Date: Sun, 25 Nov 2012 21:20:39 GMT Server: GFE/2.0 Connection: keep-alive <!DOCTYPE html> ... $
Saúdos
No hay comentarios:
Publicar un comentario