답변:
curl ai
curl aihttp : // 필요 없음
ai있어야합니까? curl: (6) Could not resolve host: ai여기에 제공 합니다.
ai 는 TLD입니다. 일반적으로 TLD는 웹 사이트를 호스팅하는 주소로 해결되지 않지만 분명히 그렇게합니다.
exec 3<>/dev/tcp/ai/80;echo GET />&3;cat<&3
파일 디스크립터 3에서 ai 사이트와 함께 tcp 소켓을 열고 get을 발행하고 결과를 표시합니다. 아마 더 골프를 칠 수 있습니다.
"주위 GET /.
URLDownload@"v.ht"
FetchURL합니다
URLFetch11 이전에 Mathematica 버전이 필요 하다는 것을 생각하십시오 .
URLTools reference.wolfram.com/language/ref/URLFetch.html
우리 모두를 사용하고 있기 때문에 www.ai...
irm ai.
사용 Invoke-RestMethod- 표준 출력으로 결과를 출력
대체 답변, Invoke-WebRequest및 -OutFileparam을 사용하여 실행 디렉토리의 'a'라는 파일에 저장합니다 .
iwr ai. -OutF a
irm다운로드하지 않는 nitpick을 any file사용합니다. 그리고 irm ai.나를 위해 작동하지 않습니다-이름을 확인할 수 없다고 말합니다 ... 나는 "$(irm g.cn)"제안으로 얻습니다 .
irm@ 존 해스 우드 (John Hathwood) 에 관한 좋은 지적 -이것이 여전히 도전에 맞거나 변경이 필요한가? 나는 '모든 파일'에 대해 조금 불분명합니다-json 또는 xml의 '파싱 된'복사본을 출력하고 다른 모든 파일은 원시로 반환됩니다.
nslookup ai.또는 nslookup www.ai 8.8.8.8?
iwr답변이 올바른 것입니다.
fetch`//ai`.then(x=>x.text())
약속 합의에 따라 (41 바이트)
fetch`//ai`.then(x=>x.text()).then(alert)
alert.
text약속을 반환 합니까 아니면 ...then(x=>alert(x.text()))작동합니까?
짧지는 않지만 나는 더 나아갈 수 있다고 생각했습니다.
from urllib import*
urlopen('http://ai').read
from urllib import*\nurlopen('http://g.co').read두 번째 줄은 명명되지 않은 람다 함수와 같은 명명되지 않은 함수이므로 유효한 제출 이라고 생각 합니다.
IOError: [Errno socket error] [Errno 8] nodename nor servname provided, or not known
파일에 다음이 포함되어 있습니다.
GET / HTTP/1.1\r\n
Host: v.ht\r\n
\r\n
나는 이것을 어떻게 평가해야하는지 무지한다고 공언한다. 파일은 31 바이트이며 원하는 URL을 포함하며 -v플래그 값은 원하는 파일을 가져올 지 또는 오류 응답을 얻을지 결정합니다.
nc ai 80<<<GET\ / works for me for 18B
Host value. I can maybe remove the last two \r\n couplets
ai for curl or wget but does for nc. try ai. (trailing dot), or 3.ly. It's an error page, but that's still within the bounds of the challenge.
\n. I'll try some more stuff when I get home
(require net/url)(port->string(get-pure-port(string->url"http://ai")))
<iframe src="http://ai">
This technically fails as it renders the result...
<embed src=//ai
gf
Expects the URL http://3.ly/ as input. gf opens the current file under the cursor. Thanks to netrw, this works fine for URLs. I found this just now while trying to remember the command to open URLs in your browser (found it, it's gx).
PowerShell 5
-join[char[]][net.webclient]::new().downloaddata('http://ai.')
66 bytes for more older versions of PowerShell
-join[char[]](new-object net.webclient).downloaddata('http://ai.')
from requests import*
print(get('http://ai').text)
-2 bytes by switching URLs -3 bytes thanks to ovs
from request import* is 2 bytes shorter
http://ai is a valid full URL..
URLDownloadToFile,http://g.co,g
There's a built-in so it's not very exciting. Try to fashion, though, the function is fairly long.
wget ai. (with a trailing dot) works.
nslookup, dig, and nc all find it fine. Oh well, not the first difference I've seen, and not worth installing a vm for.
puts open('http://ai').read
+10 bytes for -ropen-uri flag (to require open-uri library)
$ perl -MLWP::UserAgent -e 'getstore($url)'
perl -e'' inside your bytecount. About how to count flags & co, see this post. See you around I hope!
jk'z
With URL http://v.ht as input. Takes an URL string as input, downloads the file, and prints its content.
Explanation:
jk'z
z Get the input string (URL)
' Download the file from the URL, return a list of lines
jk Join the list on k which is the empty string
Note that we cannot use the function s for concatenating the list because of bytes types issues.
Slightly cheating, 2 + 11 = 13 bytes (it displays the list of the lines in the file instead of a single string for the whole file):
'z
You will need to install Pyth on your machine to test it (the online interpreter does not execute unsafe operations).
KDB+ >= 3.4
q).Q.hg`http://ai
from here.
KDB+ < 3.4
q)`:http://ai"GET / HTTP/1.0",4#"\n"
"HTTP/1.1 200 OK\r\nDate: Thu, 11 May 2017 21:45:01 GMT\r\nServer: Apache/1.3..
curl이미 존재하는 도구가 아닙니까? :)