Merge pull request #126 from xexyl/2005-mynx
Minor updates to 2005/mynx
This commit is contained in:
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;
|
||||
|
||||
@@ -226,6 +226,16 @@ is true on both linux and macOS, with `k` being equal to 22.
|
||||
Should the entry use `perror()`? Perhaps not but we're not sure of its purpose
|
||||
so it can stay for now with this note.
|
||||
|
||||
### [2005/mynx](2005/mynx/mynx.c) ([README.md](2005/mynx/README.md))
|
||||
|
||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) notes that, though
|
||||
probably obvious, this entry will not work with https. He changed the code to
|
||||
scan for https too (it exited before) in case someone comes up with a clever
|
||||
command line to make it work but the problem is a secure connection has to first
|
||||
be set up in order to give http commands. This is not a bug but it's worth
|
||||
pointing out as it won't work on as many websites as it used to including the
|
||||
[IOCCC website](https://www.ioccc.org) itself.
|
||||
|
||||
|
||||
### [2019/endoh](2019/endoh/prog.c) ([README.md](2019/endoh/README.md))
|
||||
|
||||
|
||||
Reference in new issue
Block a user