Unless a server enables "Allow ASP Source to be viewed" you will ONLY get the resulting html.
I wish it weren't true myself hehe, but it is.
Scott
------------------
Scott
Announcement
Collapse
No announcement yet.
Downloading asp-files?
Collapse
X
-
I don't see troubles with this page.
But, of course, should be correct values in TCP OPEN.
+ it's necessary to use authorization with certain proxy servers.
Code:#Compile Exe #Register None #Dim All #Include "WIN32API.INC" Function PbMain Dim Buffer As String, kBuffer As Long, i As Long, j As Long Tcp Open Port 80 At "www.lauritz.com" As #1 TimeOut 5000 Tcp Print #1, "GET <A HREF="http://www.lauritz.com/s_j/4.asp?ItemID=18836"" TARGET=_blank>http://www.lauritz.com/s_j/4.asp?ItemID=18836"</A> + " HTTP/1.0" Tcp Print #1, "" kBuffer = 2048: Buffer$ = Space$(kBuffer) Open "Tmp.Html" For Output As #2 Do Tcp Recv #1, kBuffer, Buffer If Len(Buffer) = 0 Then Exit Do Print #2, Buffer; Locate 2, 1: Print "Read" + Str$(Lof(2)) + " bytes" Loop Close #2 Open "Tmp.Html" For Binary As #2: Get$ #2, Lof(2), Buffer: Close #2 i = Instr(Buffer, $CrLf + $CrLf) If UCase$(Left$(Buffer, 5)) = "HTTP/" And i Then Buffer = Mid$(Buffer, i + 4) Tcp Close #1 Open "Tmp.Html" For Output As #2: Print #2, Buffer;: Close #2 End Function
E-MAIL: [email protected]
Leave a comment:
-
I don't know what "GetWeb" code you're referring to; I did a search
on "GetWeb" across all forums and didn't find anything by Dave.
However, if you're trying to download an asp file via http, it's
not going to work. When you issue an HTTP GET request of a server
that processes ASP files (IIS or one with Chilisoft ASP), the web
server executes the code in the ASP and displays the results. This
is different than what the typical web server does with regular
html files (just return them whole to the requestor).
There are some IIS exploits that will allow you to view the source
code of an asp rather than just the results of the execution, but
a normal HTTP GET won't do it.
------------------
Troy King
[email protected]
Leave a comment:
-
Downloading asp-files?
I tried Dave's GetWeb-code on this address: http://www.lauritz.com/s_j/4.asp?ItemID=18836
It didn't work. Is there a trick for asp-files?
Regards
Peter
------------------
Tags: None
Leave a comment: