Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
| ' This .VBS is created for launch a console application without Window | |
| ' Executing Options | |
| Const HIDDEN_WINDOW = 0 | |
| Const NORMAL_WINDOW = 1 | |
| Const MINIMIZED_WINDOW = 2 | |
| Const MAXIMIZE_WINDOW = 3 | |
| ' Executing arguments. | 
| #REQUIRES -Version 3.0 | |
| # This is a simple sample for access the MS UIAutomation in PowerShell. | |
| # In this sample: | |
| # 1. Load the MS UIA via System.Reflection.Assembly | |
| # 2. Launch the AUT ( calc.exe ) | |
| # 3. Find the AutomationElement via the AUT Process Id | |
| # 4. Find buttons via 'ClassName' and 'Name' property | |
| # 5. Click the '1', '+', '1', '=' buttons. | |
| # At last, we will get '2' in the result of calc App. | 
| # We assume that the driver is installed via the MSI. | |
| [string] $mongoDriverPath; | |
| # Check to see if we are running the 64 bit version of Powershell. | |
| # See http://stackoverflow.com/questions/2897569/visual-studio-deployment-project-error-when-writing-to-registry | |
| if ([intptr]::size -eq 8) { | |
| $mongoDriverPath = (Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v3.5\AssemblyFoldersEx\MongoDB CSharpDriver 1.0").'(default)'; | |
| } | |
| else { | |
| $mongoDriverPath = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\.NETFramework\v3.5\AssemblyFoldersEx\MongoDB CSharpDriver 1.0").'(default)'; |