![]() |
#521 |
Junior Member
Join Date: Oct 2018
Posts: 6
|
Hello Everyone.
I'm having SendRequest Error if checking some sites. For example, I'd like to get headers: inetc::head /SILENT "https://35.169.75.153/" "D:\0.txt" /END -> SendRequest Error That's a random site - www.quora.com - I need smth else but anyway... Also if I try this: inetc::head /SILENT "https://www.quora.com/" "D:\0.txt" /END -> Access Forbidden (403) Please, help would be appeciated. |
![]() |
![]() |
![]() |
#522 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
https://35.169.75.153/ does not work in a modern browser either, it will not be able to match the certificate to the host. Adding the /WEAKSECURITY INetC option might be able to work around that.
403 is "The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated." IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#523 |
Junior Member
Join Date: Oct 2018
Posts: 6
|
No, /WEAKSECURITY not working.
I guess I need 0x3300 flag to be set. Is there any instruction of how to compile Inetc project? |
![]() |
![]() |
![]() |
#524 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
And that is what? No flag is going to fix the 403 I'm guessing.
Depends on your setup of course. In Visual Studio you can probably just create a .dll project and add the source files. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#525 |
Junior Member
Join Date: Oct 2018
Posts: 6
|
![]() |
![]() |
![]() |
![]() |
#526 |
Junior Member
Join Date: Oct 2018
Posts: 6
|
This is URL I need to get data from:
https://35.189.228.145/win64 inetc::head /SILENT /WEAKSECURITY "https://35.189.228.145:443/win64" "D:\0.txt" /END And still SendRequest Error. |
![]() |
![]() |
![]() |
#527 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
INetC uses the same HTTP library as Internet Explorer. Does that URL work in IE?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#528 | |
Junior Member
Join Date: Mar 2019
Posts: 4
|
Quote:
![]() I guess I'll have to research what registry keys were turned off that represent TLS 1.0, TLS 1.1, and TLS 1.2, and set them on during NSIS execution/installation. |
|
![]() |
![]() |
![]() |
#529 |
Junior Member
Join Date: Mar 2019
Posts: 4
|
FIXED!
The code goes something like this: code: Code "0x00000A80" for the SecureProtocols DWORD value in the IE registry is the default when you reset settings. TLS 1.0, 1.1, 1.2 are all turned on by default. It's just simple enough to restore the value to whatever it was after you're done using the plug-in. I don't wanna figure out how to AND on the bit to just turn on TLS 1.2 and leave it on... That's the only protocol I needed on for that particular link to work. I turned a lot of IE settings off cause I don't trust the browser and only use it for testing/development, so that's how I ran into this problem myself. I'm surprised this plug-in has a dependency to IE like this, I would've hoped it just uses the winsock API directly to get the job done, but free is free. |
![]() |
![]() |
![]() |
#530 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Technically, it uses WinINET which is the same internet library IE uses.
Windows 2000 added a new lighter HTTP API. I'm not sure if it also uses the same security settings as IE. Using winsock directly would mean that we manually would have to handle the encryption and certificates. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#531 |
Junior Member
Join Date: Aug 2001
Location: Earth
Posts: 36
|
I'm glad to see this topic is still active.
I have tried using these two INetC plugins: https://nsis.sourceforge.io/Inetc_plug-in https://github.com/DigitalMediaServer/NSIS-INetC-plugin In this example I am including the username and password which I think is supposed to send automatically to the proxy server without the pop up Windows/web/whatever authorization screen: inetc::get /proxy localhost:80 /username wut /password oic "http://download.blah.com/setup.exe" "$instdir\test_setup.exe" /end pop $0 messagebox mb_ok "$0" But the auth screen still pops up every time (attached, hopefully, below). If I don't put in the information the messagebox says "Cancelled" and the download fails. If I manually type in the username and password in the auth dialog (which is redundant since it was supposed to be passed automatically) the download works and the messagebox says "OK". I also tried /USERNAME and /PASSWORD but I don't think case matters and I tried /weaksecurity but I don't think that's the right angle anyway. What am I doing wrong? Any suggestions? Thank you! ![]() meh. |
![]() |
![]() |
![]() |
#532 | |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Did you read that wiki page?
Quote:
/weaksecurity is for HTTPS and certificates, not password authentication. IntOp $PostCount $PostCount + 1 |
|
![]() |
![]() |
![]() |
#533 |
Junior Member
Join Date: Aug 2001
Location: Earth
Posts: 36
|
The dialog is for the proxy. And thank you for pointing out the /password part. Yes, I did see it but I just assumed it was something possible to do but not really required. If that make sense. I will give it a shot though. I'm sure it will work.
Out of curiosity only, should it work the way I had it originally? meh. |
![]() |
![]() |
![]() |
#534 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
I don't have a proxy server I can test on but I assume the INetC author tested it but I'm not 100% sure.
Your syntax looks correct assuming only the proxy requires authentication. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#535 |
Junior Member
Join Date: Aug 2001
Location: Earth
Posts: 36
|
Correct, only the proxy server requires auth.
The http://user : pass@blah suggestion worked. But you already knew that. ![]() Thanks for your help! meh. |
![]() |
![]() |
![]() |
#536 | ||
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Quote:
I did consider writing a WinHTTP plug-in but the current recommendations are: Quote:
IntOp $PostCount $PostCount + 1 |
||
![]() |
![]() |
![]() |
#537 |
Junior Member
Join Date: Sep 2003
Location: Roswell, GA
Posts: 44
|
Some subset of my users are getting a CreateThread error when using INetC - the error code via GetLastError() is 8; which seems to be ambiguous regarding out of memory or too many threads.
I've tried recompiling InetC to explicitly pass a thread stack size, or update the default thread stack sizes, it doesn't seem to make a difference. Why would this error occur, especially on 64-bit systems with plenty of memory and very few running processes? |
![]() |
![]() |
![]() |
#538 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
Could it be Anti-Virus software that fails CreateThread on purpose?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#539 |
Junior Member
Join Date: Sep 2003
Location: Roswell, GA
Posts: 44
|
I've asked that numerous times; and they all claim that AV is off - it seems to be affecting around 5-10% of the population. Enough to be significant but not enough to be able for me to duplicate or get a feel for why.
|
![]() |
![]() |
![]() |
#540 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
|
I think maybe it runs without a new thread when silent. You could try that and see what happens.
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#541 |
Junior Member
Join Date: Sep 2003
Location: Roswell, GA
Posts: 44
|
Looking at the source, it always creates a new thread - but that is an interesting idea. I could just call internetTransfer(&hDlg) directly if I was silent (and I'm making a very small/quick call). Let me poke at that.
|
![]() |
![]() |
![]() |
#542 |
Junior Member
Join Date: Oct 2016
Posts: 7
|
Hi! I have an issue with windows XP. Trivial code
code: works everywhere but windows XP. Popping result from stack gives an empty string. code: This url works in xp's internet explorer. I use the latest plugin and the latest NSIS versions. |
![]() |
![]() |
![]() |
#543 |
Junior Member
Join Date: Oct 2016
Posts: 7
|
My mistake, the result is not empty. It is "SendRequest Error". I'm thinking to use curl for windows (+5 mb), because the issue is still not resolved.
|
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|