Forum > Networking and Web Programming
GetURLText
BobDog:
Windows method, takes a couple of seconds to find site.
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- {$APPTYPE CONSOLE}usessysutils,process; function download(site:ansistring):ansistring;varc:ansistring='';newfile:ansistring;Fin:file of byte;len:int32;begin newfile:=GetCurrentDir +'/site.txt'; runcommand('powershell',['Invoke-WebRequest',site,'-OutFile',newfile],c); Assign (Fin,newfile); Reset (Fin); len:=filesize(Fin); setlength(c,len); Reset (Fin,len); BlockRead (Fin,c[1],1); close(Fin); deletefile(newfile); exit(c);end; var site:ansistring='https://www.example.com'; c:ansistring; begin c:=download(site); writeln(c); writeln('PRESS RETURN TO END ...'); readln; end.
dsiders:
If you're using 64-bit, the file names are:
libcrypto-1_1-x64.dll
libssl-1_1-x64.dll
If you're using 32-bit, the file names are:
libcrypto-1_1.dll
libssl-1_1.dll
If your URL is valid and your uses clause has fphtttpclient and opensslsockets, that is all you need.
KodeZwerg:
--- Quote from: dsiders on March 06, 2023, 10:27:52 pm ---the file names are
--- End quote ---
for completeness:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} --- {$IFDEF WINDOWS} DLLSSLName: string = 'ssleay32.dll'; DLLSSLName2: string = 'libssl32.dll'; DLLSSLName3: string = {$IFDEF WIN64}'libssl-1_1-x64.dll'{$ELSE}'libssl-1_1.dll'{$ENDIF}; DLLUtilName: string = 'libeay32.dll'; DLLUtilName2: string = {$IFDEF WIN64}'libcrypto-1_1-x64.dll'{$ELSE}'libcrypto-1_1.dll'{$ENDIF}; {$ELSE} {$IFDEF OS2} {$IFDEF OS2GCC} DLLSSLName: string = 'kssl10.dll'; DLLUtilName: string = 'kcrypt10.dll'; DLLSSLName2: string = 'kssl.dll'; DLLUtilName2: string = 'kcrypto.dll'; {$ELSE OS2GCC} DLLSSLName: string = 'emssl10.dll'; DLLUtilName: string = 'emcrpt10.dll'; DLLSSLName2: string = 'ssl.dll'; DLLUtilName2: string = 'crypto.dll'; {$ENDIF OS2GCC} {$ELSE OS2} DLLSSLName: string = 'libssl'; DLLUtilName: string = 'libcrypto'; { ADD NEW ONES WHEN THEY APPEAR! Always make .so/dylib first, then versions, in descending order! Add "." .before the version, first is always just "" } DLLVersions: array[1..19] of string = ('', '.1.1', '.11', '.10', '.1.0.6', '.1.0.5', '.1.0.4', '.1.0.3', '.1.0.2', '.1.0.1','.1.0.0','.0.9.8', '.0.9.7', '.0.9.6', '.0.9.5', '.0.9.4', '.0.9.3', '.0.9.2', '.0.9.1'); {$ENDIF OS2} {$ENDIF WINDOWS}opensslsockets -> openssl
Navigation
[0] Message Index
[*] Previous page