Skip to content

Instantly share code, notes, and snippets.

@ifnull
Created October 26, 2012 21:44
Show Gist options
  • Save ifnull/3961743 to your computer and use it in GitHub Desktop.
Save ifnull/3961743 to your computer and use it in GitHub Desktop.
CURL IP w/ specific host
# Bypass HOSTS file and DNS and send request directly to IP with specified host name.
# Example below sends request to localhost with the host name www.foobar.com.
curl -sL -w "%{http_code}\\n" -o /dev/null --insecure --resolve 'www.foobar.com:127.0.0.1' https://www.foobar.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment