Minor updates to 2005/mynx
Though this will not work as is I have changed the code to scan for
https as well (it exited before). This is so if someone comes up with a
clever command line to make it work it can. A secure connection has to
be established before http commands can be given but now it at least can
connect (though it's been a while since I've played with sockets so
maybe I'm forgetting some detail - one does have to specify the port but
I gave an example in the README.md file for that).
In the README.md I pointed out that one has to specify http:// (or else
https though with the caveat noted above). I also explained how to
specify an alternative port.
I also noted the https issue in the bugs.md file in the INABIAF section
('it's not a bug it's a feature').
As well I changed the try command in the entry README.md file to refer
to a page that does not use https as trying it on the ioccc website
(what it used to) will just return a 301 error.
This commit is contained in:
1 parent
0aa291aaff
commit
084a311418
3 files changed
+28
-3
No files matched your search
+17
-2
@@ -16,15 +16,30 @@ make
|
||||
### To run:
|
||||
|
||||
```sh
|
||||
./prog
|
||||
./mynx http://<domain>
|
||||
```
|
||||
|
||||
You can specify a port by appending to the domain `:port`. See notes below on
|
||||
the issue of https.
|
||||
|
||||
### Try:
|
||||
|
||||
```sh
|
||||
./mynx http://www.ioccc.org/
|
||||
./mynx http://www.textfiles.com
|
||||
```
|
||||
|
||||
|
||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) pointed out that this
|
||||
will not work for https initially for two reasons. First it scanned for http://.
|
||||
Cody changed it to scan for both http:// and https:// but the problem is a
|
||||
secure connection needs to be set up before http commands can be sent. One would
|
||||
also have to specify a port in the URL. Fortunately or unfortunately many more
|
||||
websites use https nowadays so this entry will not work as well as it used to.
|
||||
If one were to try and connect to `http://www.ioccc.org` with this entry they'll
|
||||
just get a 301 error. Perhaps someone can come up with a pipeline that will make
|
||||
this work with the change made. Otherwise just enjoy it for what it was.
|
||||
|
||||
|
||||
## Judges' comments
|
||||
|
||||
This little mynx will give any Fiery Fox a run for its money. A nice complement
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ main(I V, c *v)
|
||||
struct sockaddr_in A;
|
||||
L = 0;
|
||||
B = 1;
|
||||
Q !sscanf(t, "http://%255[^/]%n", h, &n) && !*h) {
|
||||
Q (!sscanf(t, "http://%255[^/]%n", h, &n)&&!sscanf(t,"https://%255[^/]%n",h, &n) && !*h)) {
|
||||
Q !(f = fopen(t, "rb")))
|
||||
k 1;
|
||||
goto e;
|
||||
|
||||
Reference in new issue
Block a user