Why “Content-Length: 0” in POST requests?

Internet Explorer does not send form fields if they are posted from an authenticated site (NTLM) to a non-authenticated site (anonymous). This is feature for challange-response situations (NTLM- or Kerberos- secured web sites) where IE can expect that the first POST request immediately leads to an HTTP 401 Authentication Required response (which includes a challenge), … Read more

Microsoft Windows Python-3.6 PyCrypto installation error

The file include\pyport.h in Python installation directory does not have #include < stdint.h > anymore. This leaves intmax_t undefined. A workaround for Microsoft VC compiler is to force include stdint.h via OS environment variable CL: Open command prompt Setup VC environment by runing vcvars*.bat (choose file name depending on VC version and architecture) set CL=-FI”Full-Path\stdint.h” … Read more

How do I create a shortcut via command-line in Windows?

You could use a PowerShell command. Stick this in your batch script and it’ll create a shortcut to %~f0 in %userprofile%\Start Menu\Programs\Startup: powershell “$s=(New-Object -COM WScript.Shell).CreateShortcut(‘%userprofile%\Start Menu\Programs\Startup\%~n0.lnk’);$s.TargetPath=”%~f0″;$s.Save()” If you prefer not to use PowerShell, you could use mklink to make a symbolic link. Syntax: mklink saveShortcutAs targetOfShortcut See mklink /? in a console window for … Read more

Create Named Pipe C++ Windows

You cannot create a named pipe by calling CreateFile(..). Have a look at the pipe examples of the MSDN. Since these examples are quite complex I’ve quickly written a VERY simple named pipe server and client. int main(void) { HANDLE hPipe; char buffer[1024]; DWORD dwRead; hPipe = CreateNamedPipe(TEXT(“\\\\.\\pipe\\Pipe”), PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT, // … Read more

Running cURL on 64 bit Windows

Your problem is that your are not using the Curl you installed but a CmdLet called Invoke-WebRequest. Just execute : Remove-item alias:curl And test your curl again, then store it in your profile. The explanation is that it exists a native alias to the Invoke-WebRequest which is a CmdLet that is supposed to deliver a … Read more

How can I get a list of all open named pipes in Windows?

In the Windows Powershell console, type [System.IO.Directory]::GetFiles(“\\.\\pipe\\”) If your OS version is greater than Windows 7, you can also type get-childitem \\.\pipe\ This returns a list of objects. If you want the name only: (get-childitem \\.\pipe\).FullName (The second example \\.\pipe\ does not work Powershell 7, but the first example does)