From 13510be1f5166ce7a059b7d42891ddfbb6d82d78 Mon Sep 17 00:00:00 2001 From: max9836 <158651270+max9836@users.noreply.github.com> Date: Sun, 11 Feb 2024 13:27:35 +0800 Subject: [PATCH] Update README.md --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dca274c..5818301 100644 --- a/README.md +++ b/README.md @@ -116,5 +116,63 @@ You do not have to look at the sections below unless you have great interest of # Analyze the program These things are happening while the program runs: -1. Microsoft Edge is launched and negivated to "https://www.Bing.com" by this command `Start-Process msedge -ArgumentList "https://www.bing.com"` -2. Each search query is +#### 1. Microsoft Edge is launched and negivated to "https://www.Bing.com" by this command `Start-Process msedge -ArgumentList "https://www.bing.com"`. After that, a few seconds(depends on your input) +``` + Start-Process msedge -ArgumentList "https://www.bing.com" + Start-Sleep -Seconds $Browser_Load_time +``` +#### 2. Each search query is generated by combining the prefix "MICROSOFT_REWARD_CHEATER_APP_OPERATION" and a randomly generated string(text). +``` + function Get-RandomString { + param( + [int]$length + ) + $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' + $randomString = '' + for ($i = 0; $i -lt $length; $i++) { + $randomString += $characters[(Get-Random -Minimum 0 -Maximum $characters.Length)] + } + return $randomString + } + $randomQueries = 1..$Searches | ForEach-Object { + "MICROSOFT_REWARD_CHEATER_APP_OPERATION?SEARCH=$(Get-RandomString -length $Random_length)" + } +``` +#### 3. Each search is performed by a loop. +``` + foreach ($query in $randomQueries) { + $Count += 1; + $FILE_DOC += "[$Count]:MICROSOFT REWARD CHEATER APP OPERATION::$query`n" + [System.Windows.Forms.SendKeys]::SendWait("/") + [System.Windows.Forms.SendKeys]::SendWait($query) + [System.Windows.Forms.SendKeys]::SendWait("{ENTER}") + Start-Sleep -Seconds 3 + } +``` +#### 4. After each search is performed, Microsoft Edge will be closed. +``` + Stop-Process -Name msedge +``` +#### 5. The system will ask you about the output log file with the following question: `Output log?` +``` + $answer = Read-Host -Prompt "Output log? (Y/N)" + if ($answer -eq "Y" -or $answer -eq "y") { + if ($Path -eq "") { + $Path = Read-Host "Please input file path" + } + $File_name = "Microsoft reward cheater output (" + $File_name += Get-Date -Format "yyyy-MM-dd" + $File_name += ").txt" + New-Item -ItemType "File" -Name $File_name -Value $FILE_DOC -Path $Path -Force + Write-Information -MessageData ("The output log has been successfully saved in the specified path, $Path, as $File_name.") + } elseif ($answer -eq "N" -or $answer -eq "n") { + } else { + $answer = Read-Host -Prompt "Output log? (Y/N)" + } +``` +> [!NOTE] +> If you want a output log file, type `y` or `Y`; if you do not want a output file, type `n` or `N`. +#### 6. The content of the output log file will be outputted. +``` + Write-Output $FILE_DOC +```