124
votes
Accepted
Chrome 68 "Not secure" How to make it in red color?
Yes, we do have that option
Result
The result being all non-HTTPS pages in red color:
Setting it up
Access internal settings:
chrome://flags/
Look for:
Mark non-secure origins as non-secure
...
92
votes
Accepted
How do web servers know whether you're using direct IP address access?
To answer your question of how it knows, it has to do with what your browser sends the server.
You're right that the system always resolves it to an IP address, but the browser sends the URL you ...
53
votes
Getting curl to output HTTP status code?
Status code ONLY
[0]$ curl -LI http://www.example.org -o /dev/null -w '%{http_code}\n' -s
[0]$ 200
All credit to this GIST
53
votes
Why does my browser attempt to download pages from http://clhs.lisp.se instead of viewing them normally?
There is something wrong with the way that website and/or web sever is delivering web pages.
This is not a problem on your end but rather something odd on the server side; with either the website ...
52
votes
Accepted
Are there well known HTTP-only sites?
A well-known public HTTP only site will resolve this
You can use http://neverssl.com:
What?
This website is for when you try to open Facebook, Google, Amazon, etc
on a wifi network, and ...
47
votes
How do I make a POST request using curl?
If you are lazy, you can get google-chrome or firefox to do all the work for you.
Right-click the form you want to submit and select Inspect (or Inspect Element for Firefox). This will open the ...
40
votes
Accepted
What is the difference between Invoke-WebRequest and Invoke-RestMethod?
You can find out by decompiling the Microsoft.PowerShell.Commands.Utility assembly.
Basically, Invoke-WebRequest does not deal with parsing the data all that much. With -UseBasicParsing, it does some ...
39
votes
Accepted
Are HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables standard?
I agree with BillThor's statement that This is more a convention than a standard.
I don't know the origin of these variables but in case of HTTP on *nix many conventions seem to originate from ...
36
votes
Can you go to a website by typing the IP address into the address bar?
TL;DR It depends on the server's configuration. A quick positive example is one.one.one.one / 1.1.1.1.
I'm assuming you're following the usual lecture on your Computer Networking course about how ...
32
votes
Accepted
What protocol is used for downloading files?
Say I download an executable like Pycharm from Jetbrains.com. HTTP was used to deliver contents of the website - is this also used when I download the file? I read that FTP was used but also saw it's ...
31
votes
Accepted
curl http_code of 000
The response 000 indicates that cURL failed to execute for some reason. In such a case, you should test for cURL exit code rather than making assumptions. See the "Exit Codes" section of the curl ...
29
votes
How to track url redirects in the browser?
Now, when FireBug is integrated into developer tools you may enable persistent logs by next steps:
Open DevTools (F12)
Go into Toolbox options (forth icon from right top)
Find Common preferences ...
24
votes
Can you go to a website by typing the IP address into the address bar?
The IP stack isn't really 'aware' or 'care' about the IP. All DNS does is tell you "this domain name is at this IP".
In the 'simplest' sense there's no difference between either scenario - ...
23
votes
Can you go to a website by typing the IP address into the address bar?
Call me crazy but none of the current answers contains the word "header", which is the most important part for a web server like Apache, Nginx etc. to resolve the correct site. The host ...
21
votes
How can I make wget rename downloaded files to not include the query string?
I realized after processing a large batch that I should have instructed wget to ignore the query strings. I did not want to do it over again so I made this script which worked for me:
# /bin/bash
...
21
votes
Getting curl to output HTTP status code?
This is a painful curl --fail limitation. From man curl :
-f, --fail
(HTTP) Fail silently (no output at all) on server errors
But there is no way to get both the non-zero return code AND ...
21
votes
Convert HTTP requests to SOCKS5
You can also use Privoxy. Add this line to its config.txt file:
forward-socks5 / 127.0.0.1:9050 .
(Don't forget the small dot at the end.)
Then use the HTTP or HTTPS proxy at 127.0.0.1:8118
21
votes
Get modification time of remote file over HTTP in Bash script
The server response does usually have Last-Modified field, you can check it without downloading the file. No need to use -X HEAD, there's a special option -I for that (the -s suppresses progress ...
21
votes
How do web servers know whether you're using direct IP address access?
With the HTTP 1.1 protocol (the prior HTTP 1.0 version has been obsolete for quite some time, so is unlikely to be used by any recent version of a browser), the host header was introduced. For HTTP 1....
21
votes
Accepted
How does browser know which version of HTTP it should use when sending a request?
HTTP/1.x
Both HTTP/1.1 and HTTP/1.0 use compatible request formats. After the first request, the server's response will indicate the version it supports, plus headers such as "Connection: keep-...
18
votes
Are HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables standard?
There is no real standard.
Different tools interpret these variables similarly but subtly differently. For example the case of the recognised environment variables and the case-precedence varies ...
15
votes
Getting curl to output HTTP status code?
For a POST request, the following worked:
curl -w 'RESP_CODE:%{response_code}' -s -X POST --data '{"asda":"asd"}' http://example.com --header "Content-Type:application/json"|grep -o 'RESP_CODE:[1-4][...
15
votes
Accepted
How does the protocol "mongodb" work?
To manually interact with it you need a client to speak the protocol. This is what a web browser does, it speaks http/https for you and issues commands (GET, POST etc.) and renders the responses for ...
14
votes
How to send an HTTP request for a certain domain name to a specific IP address?
You can use CURL to initiate a request to the server with a custom host header.
curl --header "Host:abc.com" xxxx.xxxx.xxxx.xxxx
12
votes
Accepted
Why I use chrome request a site URL do not see Host header?
All HTTP/1.1 request messages must contain a Host header field.
Yes, but what you have is not actually an HTTP/1.1 request.
You're looking at HTTP/2, where the :authority pseudo-header serves the ...
11
votes
Convert HTTP requests to SOCKS5
HTTP Proxy to Socks5
Install python-proxy
$ pip3 install pproxy
$ pproxy -r socks5://127.0.0.1:9150 -vv
Usage
http://127.0.0.1:8080
https://127.0.0.1:8080
11
votes
Accepted
Storing a HTTP POST request in a bookmark or something similar as you would with a GET request
You can create a bookmarklet that uses JavaScript to send a POST request when clicked.
The following code sends a POST request with payload foo=bar to https://example.com by appending a form to the ...
10
votes
Accepted
Capture Only HTTP traffic in tshark
Use a display filter:
tshark -Y http
If you need to save the capture, you can run the display filter on the output:
tshark -r packetFile.pcap -Y http -w packetFile-http.pcap
10
votes
What is the difference between Invoke-WebRequest and Invoke-RestMethod?
systemcenterautomation.com did a blog post about this. The conclusion:
Invoke-RestMethod is much better at dealing with XML and JSON results,
while Invoke-WebRequest is better at dealing with ...
10
votes
Why does my browser attempt to download pages from http://clhs.lisp.se instead of viewing them normally?
This funny website return for your page an answer with the following headers:
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Accept-Ranges: bytes
Content-Length: 8896
Date: Sat, 21 Sep 2019 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
http × 1035networking × 179
https × 95
proxy × 91
linux × 90
apache-http-server × 76
windows × 67
firefox × 62
browser × 58
webserver × 58
google-chrome × 47
download × 44
curl × 40
tcp × 38
ssh × 34
wget × 32
wireshark × 32
windows-7 × 29
dns × 28
security × 26
macos × 25
ssl × 25
nginx × 24
redirection × 23
ubuntu × 22